Help with redirects and port-forwarding.

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

 



Hi,

I'm using Apache/1.3.36 and I don't have any room to change the
version at the moment. I have a separate Virtual Host listening on
port 8001:-

<VirtualHost *:8001>
    DocumentRoot "/opt/apache_1.3.36/htdocs"
    ServerName www.example.co.uk
    ErrorLog /var/log/http/example_error_log
    TransferLog /var/log/http/example_access_log

    RewriteCond %{REQUEST_URI} !^/portal.*
    RewriteCond %{REQUEST_URI} !^/static.*
    RewriteCond %{REQUEST_URI} !^/graphics.*
    RewriteCond %{REQUEST_URI} !^/css.*
    RewriteCond %{REQUEST_URI} !^/cgi-bin/.*
    RewriteCond %{REQUEST_URI} !^/favicon.ico
    RewriteCond %{REQUEST_URI} !^/robots.txt
    RewriteRule ^(.*)$ /portal [R=301]
</VirtualHost>

There is a firewall which is port-forwarding from port 80 to port 8001
on the web servers. The problem is that Apache is constructing
self-referential URLs with the 8001 port number. For example, it's
redirecting from http://www.example.co.uk to
http://www.example.co.uk:8001/portal which is not what I want, I want
it to keep port 80. I have tried using 'UseCanonicalName off' inside
my Virtual Host block to no avail (UseCanonicalName is turned on in
the main host block).

Are there any other suggestions other than writing explicit redirects?
Would UseCanonicalPhysicalPort fix my issue if I were using a later
version?

Cheers,
Phil.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[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