Taorluath Posted June 24, 2008 Share Posted June 24, 2008 Here is my situation: I have Apache and everything nicely installed on my Linux box. I've been running it only on my computer, not the web, testing out PHP and Mysql etc. I haven't changed much of the default settings and now I want to host it to the web. I also have a SSH server which I have successfully accessed from computers not in my network. The linux box has a static IP and everything too. So I go to my external IP address, and it gives me the router setup. I go down and turn on the port forwarding that forwards port 80 to the linux box's static ip, right underneath where I did it for the SSH. I save the settings, but when I go to my external ip again, instead of seeing my site-- or the router setup again, for that matter-- it just goes into an infinite loading sequence. It never loads anything. How do I get my Apache to the outside world? ??? Quote Link to comment Share on other sites More sharing options...
trq Posted June 24, 2008 Share Posted June 24, 2008 Have you tested this setup from the outside world instead of from within the same lan? Quote Link to comment Share on other sites More sharing options...
Taorluath Posted June 24, 2008 Author Share Posted June 24, 2008 Wait, what do you mean? If i don't forward the port, how can I see it from outside? Do you mean I should check my external ip after I forward it from outside? Shouldn't I be able to see my site from the inside as well? ??? Quote Link to comment Share on other sites More sharing options...
Taorluath Posted June 24, 2008 Author Share Posted June 24, 2008 I also got this when I forgot to use sudo, if this helps: bleh bleh@server:~$ /etc/init.d/apache2 force-reload open: Permission denied * Reloading web server config apache2 httpd not running, trying to start (13)Permission denied: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs open: Permission denied Quote Link to comment Share on other sites More sharing options...
trq Posted June 24, 2008 Share Posted June 24, 2008 Shouldn't I be able to see my site from the inside as well? Not without adding an entry to your /etc/hosts file. The error you've shown has nothing to do with your issue, but files within /etc/init.d/ cannot be executed by a normal user. You need to be root or better still use sudo. bleh bleh@server:~$ sudo /etc/init.d/apache2 force-reload Quote Link to comment Share on other sites More sharing options...
Taorluath Posted June 24, 2008 Author Share Posted June 24, 2008 I also got this when I forgot to use sudo, if this helps: Yeah, I know I didn't use sudo. But wait, you're saying that without adding something to my hosts file, only people OUTSIDE my network see my website?? And what line should I add to hosts, so that I can see it from inside? Quote Link to comment Share on other sites More sharing options...
Taorluath Posted June 25, 2008 Author Share Posted June 25, 2008 Ok, so I tried going to my site through a proxy, and I still got the same problem. Quote Link to comment Share on other sites More sharing options...
trq Posted June 25, 2008 Share Posted June 25, 2008 Maybe your isp is blocking port 80. Quote Link to comment Share on other sites More sharing options...
Taorluath Posted June 25, 2008 Author Share Posted June 25, 2008 That's what other forums have told me as well. But how do I change all the settings to get Apache to output to a different port? Is there just one file I can edit to get this change, or do I have to edit many of them? Quote Link to comment Share on other sites More sharing options...
trq Posted June 25, 2008 Share Posted June 25, 2008 it should be in your httpd.conf file (though this may vary distro to distro), the directive your looking for is called Listen. Quote Link to comment Share on other sites More sharing options...
Taorluath Posted June 26, 2008 Author Share Posted June 26, 2008 I found a Listen 80 in my ports.conf file. I changed it to 8080 there and on the port forwarding thing on my router. Now when I go to my external IP it doesn't load forever, it just goes straight to the router setup again. How come changing the port did this? How do you change the port the right way and still get it to show up as web page? Quote Link to comment Share on other sites More sharing options...
trq Posted June 26, 2008 Share Posted June 26, 2008 Did you try this from outside your network? Quote Link to comment Share on other sites More sharing options...
shelluk Posted June 27, 2008 Share Posted June 27, 2008 You wil need to use the url http://youipaddress:8080 as well after changing the port. Get a friend or someone to test this though from another PC/work or something. Your router may just be getting confused trying to NAT to that IP as it knows it's already its own. Seen this plenty of times on home routers! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.