httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Hannessen <m...@nperfection.com>
Subject [users@httpd] apache reverse proxy
Date Sat, 05 Feb 2005 12:09:54 GMT
hi.

I have currently have the following situation.
we have two servers running there own website.
for various reasons we want both websites not to be hosted on the same pc.
server 1 runs the domain nperfection.com
server 2 runs the domain aojclan.com
both domains run on there own ipv6 ip.

but on the internet however, many people can't access ipv6 yet.
so I thought it would be nice to create a apache proxy running on my ipv4 
internet adress to make these domains availible to the ipv4 internet as well.

with the of an article I found on slashdot I wrote the following config file.

Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15

LoadModule php5_module  lib/apache2/libphp5.so

<IfModule worker.c>
  StartServers         2
  MaxClients         150
  MinSpareThreads     25
  MaxSpareThreads     75
  ThreadsPerChild     25
  MaxRequestsPerChild  0
</IfModule>

<IfModule mod_cache.c>
  <IfModule mod_mem_cache.c>
    CacheEnable mem /
    MCacheSize 4096
    MCacheMaxObjectCount 100
    MCacheMinObjectSize 1
    MCacheMaxObjectSize 2048
  </IfModule>
</IfModule>

Listen 10.4.8.1:80

User apache
Group apache

PidFile var/www/logs/httpd.pid

HostnameLookups Off
ServerTokens Full
ServerSignature On

<VirtualHost *:80>
    ServerAdmin mark@nperfection.com
    ServerName www.nperfection.com
    ServerAlias *.nperfection.com
    ProxyRequests Off
    <Proxy http://nperfection.com>
        Order deny,allow
        Allow from all
    </Proxy>
    ProxyPass / http://nperfection.com/
    ProxyPassReverse / http://nperfection.com/
    ProxyPreserveHost On
</VirtualHost>


this config works fine for one domain. it correctly forwards the nperfection 
domain. I however failed in writing a config file that will let apache proxy 
both domains.

I tried adding the following.

<VirtualHost *:80>
    ServerAdmin mark@aojclan.com
    ServerName www.aojclan.com
    ServerAlias *.aojclan.com
    ProxyRequests Off
    <Proxy http://aojclan.com>
        Order deny,allow
        Allow from all
    </Proxy>
    ProxyPass / http://aojclan.com/
    ProxyPassReverse / http://aojclan.com/
    ProxyPreserveHost On
</VirtualHost>

but that ends up with the following warning when I try to start apache.
[Sat Feb 05 12:03:49 2005] [warn] _default_ VirtualHost overlap on port 80, 
the first has precedence

does anyone know if it is possible to do this?

thanks,

Mark Hannessen

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message