0

I have a computer at home running Ubuntu 10.10. I am trying to make a server and host my own website, and I am running a LAMP (Linux, Apache, MySql, PHP) server. But my IPS blocks incoming traffic on port 80. To get around this, I want my server to take HTTP requests from port 8080, in addition to port 80. But after I tried to add port 8080 to the accepted ports file, my browser cannot access it. It says "The server at mywebsite.com is taking too long to respond.". Does anyone know why it is timing out and not returning the webpage, or how I can fix this? Here is what I've done so far:

The port.conf file contains:

NameVirtualHost *:80
Listen 80
Listen 8080

The apache2.conf file contains:

# Include the virtual host configurations:
Include sites-enabled/
NameVirtualHost *:80
NameVirtualHost *:8080

The sites-available/default file contains:

<VirtualHost *:80 *:8080>
        ServerAdmin webmaster@localhost

Lastly I restarted apache:

$: /etc/init.d/apache2 restart

All this, as far as I can tell, should add port 8080 to for HTTP requests. When I type in "localhost" or "localhost:8080" into the web browser, it returns my website. If I type in "mysite.com" or "mysite.com:80", the site also works. But my website does not work when I search for "mysite.com:8080"; rather it times out. The reason "mysite.com:80" works is because I am accessing the site from within my local network, so I don not need to go through the modem, which would block port 80. Does anyone know why this is not working?

FIX: I'm dumb and forgot to add port 8080 on the list of acceptable ports on my Ubuntu firewall.

pwaivers
  • 315
  • 3
  • 9

1 Answers1

0

Have you had a look at the requests with wireshark or something like that? localhost will be going through the loopback device, and I'm guessing that when you request mysite.com the request is going out over a real network device. Check whether the request is getting back in again from your network - port 8080 might be blocked somewhere else.

lxop
  • 7,596
  • 3
  • 27
  • 42
  • @Ixop. Thanks for the advice! It was actually something very dumb on my part (as always..). I forgot to make the Ubuntu Firewall accept requests from port 8080, even though I had already made it accept from port 80. – pwaivers May 16 '12 at 04:42