Tell me more ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

could you help me with Apache2 configuration (on Ubuntu 10.04) to be visible on my public IP address? I'd like to know what to set and in which configuration files.

thank you

share|improve this question
Is there some way to trougleshoot this problem? in /etc/apache2/apache2.conf there is a line ServerName localhost Should I change it to my public IP? – xralf Mar 24 '11 at 7:30
not completly related, but once it will be available on a public address you should read and modify settings in the file: /etc/apache2/conf.d/security as some parameters should be switched off for public webserver security. – regilero May 30 '11 at 9:04

1 Answer

up vote 1 down vote accepted

If this machine is directly connected to the internet, no further configuration should be needed.
If there is a router in between you and the internet, forward TCP ports 80 and 443 to the web server.

share|improve this answer
ifconfig shows eth0 inet addr:192.168.1.101 Bcast:192.168.1.255 Mask:255.255.255.0 So I'm forwarding in the router port 80 and 443 to 192.168.1.101 – xralf Mar 23 '11 at 7:46
Is there some way to trougleshoot this problem? in /etc/apache2/apache2.conf there is a line ServerName localhost Should I change it to my public IP? – xralf Mar 24 '11 at 7:29
1  
You can check to see if its listening on port 80, and what IPs its listening on via netstat -an. Given that eth0 shows 192.168.1.101, the router should be configured correctly. You can also try visiting 192.168.1.101 and see if a page loads ( If you are on behind the router, easiest if you are on the same subnet as the server aka 192.168.1.xxx ) – becomingwisest May 30 '11 at 8:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.