Hello:I've read the apache Virtual hosts doc and looked at the examples and I still can't get my httpd.conf working 100% right.
Users access my server using an IP address, 123.456.789.012, and several different sub-domain names - abc.example.com , def.example.com, and ghi.example.com
I also use aliases and proxies to pass off requests from one host to another computer for processing. Right now the config for the IP address that uses the proxies and aliases is defined outside the Virtual Hosts directives - which I believe is wrong, but it's working, and the other domain names go to the Virtual Hosts. This is also a mixed ssl and unencrypted server. The addresses that go to 443 work OK, but only the default 80 works. I have included what I believe are the pertinent sections below.
Listen 80 Listen 443 ServerName example.com:80 DocumentRoot "/var/www/html/sgimis/pages" <Directory /> Options FollowSymLinks AllowOverride None </Directory> <DIRECTORY "/var/www/html/sgimis/pages"> DirectoryIndex SGIMIS.html Order allow,deny Allow from all </Directory> ProxyPass /pdx/ http://192.168.1.101:8080/ ProxyPassReverse /pdx/ http://192.168.1.101:8080/ ProxyPass /pdx2/ http://192.168.1.101:8090/ ProxyPassReverse /pdx2/ http://192.168.1.101:8090/ Alias /sgipages "/var/www/html/sgimis/pages" <Directory "/var/www/sgimis/pages"> Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all </Directory> Alias /sgigraphics "/var/www/html/sgimis/graphics" <Directory "/var/www/sgimis/graphics"> Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all </Directory> NameVirtualHost *:443 NameVirtualHost *:80 <VirtualHost *:80> ServerAdmin webAdmin@xxxxxxxxxxx DocumentRoot /var/www/html ServerName example.com </VirtualHost> <VirtualHost *:80> ServerAdmin webAdmin@xxxxxxxxxxx DocumentRoot /var/www/html/tty ServerName abc.example.com </VirtualHost> <VirtualHost *:80> ServerAdmin webAdmin@xxxxxxxxxxx DocumentRoot /var/www/html/sgine ServerName def.example.com </VirtualHost> <VirtualHost *:443> ServerAdmin webAdmin@xxxxxxxxxxx DocumentRoot /var/www/html/newsgimis ServerName ghi.example.com </VirtualHost>The above doesn't work for abc.example.com or def.example.com, but it does work for ghi.example.com, 123.456.789.012. and example.com.
I tried commenting out the document root stuff and the proxy stuff outside the virtual hosts and putting it in a virtual host like below. This didn't work for requests coming from 123.456.789.012
<VirtualHost 123.456.789.012> ServerAdmin webAdmin@xxxxxxxxxxx DocumentRoot /var/www/html/sgimis/pages ServerName 123.456.789.012 ProxyPass /pdx/ http://192.168.1.101:8080/ ProxyPassReverse /pdx/ http://192.168.1.101:8080/ ProxyPass /pdx2/ http://192.168.1.101:8090/ ProxyPassReverse /pdx2/ http://192.168.1.101:8090/ Alias /sgipages "/var/www/html/sgimis/pages" <Directory "/var/www/sgimis/pages"> Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all </Directory> Alias /sgigraphics "/var/www/html/sgimis/graphics" <Directory "/var/www/sgimis/graphics"> Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all </Directory> </VirtualHost> If anyone could provide some insight into this mess, I'd really appreciate it. Thanks very much Ken --------------------------------------------------------------------- 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