PHP SOCKET SERVER - PUNCH HOLE THROUGH APACHE AUTHENTICATION

Php Socket Server

If you are running an Apache Server with authentication (even over SSL) and for some reason want a quick (and frankly unsecure) way of punching a hole through then php can be used to create a socket server meaning you won’t get prompted for Authorisation username/password etc. It doesn’t really punch a hole through Apache; it is just running a web server on an available port!

Type the following and name the php script Socket1.php

PHP-Socket



Then, type in the following URL into your browser remembering to replace the below IP Address 192.168.1.141 with your server's particular IP Address:

https://192.168.1.141:6789/Socket1.php

Browser Output:

PHP-Socket


Where:
Server IP Address: 192.168.1.141
Port number (Socket): 6789 } I use an arbitrary port number here as I know that this particular port is free/unused elsewhere by the server.









Linux Examples - Comments