httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabricio Gouvea <fabricio.gou...@gmail.com>
Subject [users@httpd] Apache2 replies with 301 moved permanently when non-default port 80 is used
Date Fri, 28 Jan 2011 21:24:39 GMT
Hi,
My ports.conf has:
NameVirtualHost 10.77.0.77:8080
Listen 8080

and sites-available/default has:
<VirtualHost 10.77.0.77:8080>
        ServerName mysite.dyndns.org:8080
        ServerAdmin webmaster@localhost
        DocumentRoot /home/ubuntu/wordpress
</VirtualHost>

But when I try to connect, either with 10.77.0.77:8080 or
mysite.dyndns.org:8080, by looking at the wireshark trace, I see Apache
replying with a "301 moved permanently" and redirects to 10.77.0.77 or
mysite.dyndns.org (without the 8080 port!).

If I add:
Listen 80
....
<VirtualHost *:80>
        ServerName mysite.dyndns.org
        ServerAdmin webmaster@localhost
        DocumentRoot /home/ubuntu/wordpress
</VirtualHost>

Then everything works! But I can`t have that working only on default 80
because my ISP is blocking it.

I tried a bunch of different configurations with multiple combinations of:
NameVirtualHost and VirtualHost with wild card *
NameVirtualHost and VirtualHost with mysite.dyndns.org
ServerName without the port
No ServerName (and a proper entry on etc/hosts)

I'm about the get into the code!
Please help!

Mime
View raw message