Setting up apache web server behind a router
Marco Segreto
msegreto at sfsu.edu
Tue Jun 9 00:23:18 UTC 2009
Steve Reilly wrote:
> 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
>>
>> <IfModule mod_ssl.c>
>> #
>> #
>> Listen 443
>> </IfModule>
>>
>> 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.
>>
>>
>
> does your /etc/apache2/sites-available/default look like this?
>
> NamevirtualHost *:80
> <VirtualHost *:80>
> ServerName mysite.com
> ServerAlias mysite.com
> ServerAdmin sfreilly at roadrunner.com
> DocumentRoot /var/www/serendipity
> CustomLog /var/log/apache2/mysite-access.log common
> </VirtualHost>
>
> but with the port changed to 8080? and have you restarted apache for
> changes to take effect.
>
>
> steve
>
I set up my sites-available/default like said above and still no luck. I
can connect to the site from my linux machine with the command:
lynx localhost:8080
OR
lynx mysite.net:8080
I still can't connect to the site from another computer though. I'm
using dyndns to attach a domain name to my ip address as well. I can use
the domain name to connect to my server with ssh but I can't see the
webpage in a browser. I also restarted apache with
etc/init.d/apache2 reload.
Theres other things in the sites-availabe/default file that I didn't
touch like <Directory /var/www/> or <Directory "/usr/share/doc/">. Could
part of it be causing a problem?
Marco
More information about the ubuntu-users
mailing list