Apache2 replies with 301 moved permanently when non-default port 80 is used

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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!


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux