PDA

View Full Version : [ubuntu] Lamp as localhost only



shadowalexia
November 30th, 2009, 02:44 PM
Hi

I was wondering after you install apache php and mysql, how do you turn off all access exept for localhost. I followed this howto when i installed it http://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-on-ubuntu-9.10-lamp

and thats it, the author of this did not mention how to run it as a localhost only.

rudy.b
December 1st, 2009, 07:48 AM
To tell Apache to listen only to requests from localhost, change your /etc/apache2/ports.conf file to modify the Listen directive to include the IP address for localhost.

E.g. change this:

Listen 80
to this:

Listen 127.0.0.1:80

Also, you could activate your firewall to block all requests on port 80, or whatever port you have Apache listening on.

shadowalexia
December 5th, 2009, 07:28 PM
okay thanks

and just to make sure. if i ever wanted it to be accessible to the public i put in my ip that my isp gives me?