Setting up apache behind a router
Derek Broughton
derek at pointerstop.ca
Thu Jun 11 13:15:24 UTC 2009
Marco Segreto wrote:
> I have Ubuntu 8.10 server set up on my network which is connect to the
> internet through a linksys router. I wanted to be able to access
> websites on my server but need to go through a port besides 80 because
> the router blocks this port. I've enabled port forewarding on port 8080
> on my router and have set up a static IP for my linux machine. When I
> try and connect to my server with myserver.net:8080 it still times out.
> I'm pretty sure I set up everything correctly though. Here's my
> ports.conf file in the apache2 folder:
>
> NameVirtualHost *:80
> Listen 80
> Listen 8080
OK, you really can't expect that to work. You probably shouldn't touch
ports.conf - add your listen 8080 before the virtualhost definition in
sites-enabled/000-default, as well as:
NameVirtualHost *
The current definition tells Apache that VirtualHosts only work on port 80,
and then you're wondering why they don't work on 8080.
>
> I tried switching to VirtualHost *:8080 as well as changing it in the
> default file in the sites-available folder but it didn't work either.
> I've done this before on my Hardy system and I had no NameVirtualHost
> option so I'm not really sure why it's there now.
You _did_ have a NameVirtualHost *:80 in ports.conf by default, but not one
for 8080.
--
derek
More information about the ubuntu-users
mailing list