httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Cohen" <apa...@gej-it.com>
Subject RE: [users@httpd] Name based virtual hosts
Date Fri, 31 Jan 2003 06:14:29 GMT
You are using a loopback address (127.0.0.1) how do you expect it to work?
This address is valid only for the local computer, if you have more then one
IP address then try them one by one instead of 127.0.0.1.
If there's no security involved, change to be 
NameVirtualHost *
And than change the 127.0.0.1 to the appropriate IPs you have inside the
Vhost directives.

All the best,
Jeff Cohen

> -----Original Message-----
> From: Stephen Colson [mailto:scolson@westpole.com]
> Sent: Friday, January 31, 2003 1:08 AM
> To: users@httpd.apache.org
> Subject: [users@httpd] Name based virtual hosts
> 
> Greetings,
> 
> I've been trying to get apache to do name based virtual hosting for two
> dev url's I have, but apache doesn't seem to be wanting to deal with my
> httpd.conf entry for the second domain.
> 
> The error: "#apachectl restart
> Shutting down Web Service: httpd
> Setting up Web Service: [Fri Jan 31 00:38:21 2003] [warn]
> NameVirtualHost 127.0.0.1:80 has no VirtualHosts
> /usr/sbin/httpd"
> 
>   Below is the entries in my config file--mind you the IP and domain
> names have been changed, but are properly routable/look-upable. It's a
> Raq3 running Apache 1.3.6, however this is Sun's release of Apache for
> Cobal-linux systems and has all of their patches.
> 
> Are there any glaring errors? Thoughts? Suggestions? Blank stares and
> general laughter is also accepted.
> 
> Thanks!
> -s
> 
> 
> __begin conf entries__
> #...
> NameVirtualHost 127.0.0.1
> <VirtualHost dev.domain1.org www.dev.domain1.org>
> ServerName dev.domain1.org
> ServerAdmin admin
> DocumentRoot /home/sites/site4/web
> ServerAlias www.dev.domain1.org
> RewriteEngine on
> RewriteCond %{HTTP_HOST}                !^127.0.0.1(:80)?$
> RewriteCond %{HTTP_HOST}                !^www.dev.domain1.org(:80)?$
> RewriteRule ^/(.*)                      http://www.dev.domain1.org/$1
> [L,R]
> RewriteCond %{HTTP_HOST}                !^dev.domain1.org(:80)?$
> RewriteRule ^/(.*)                      http://dev.domain1.org/$1 [L,R]
> RewriteOptions inherit
> AliasMatch ^/~([^/]+)(/(.*))? /home/sites/site4/users/$1/web/$3
> AliasMatch ^/users/([^/]+)(/(.*))? /home/sites/site4/users/$1/web/$3
> AddHandler cgi-wrapper .cgi
> AddHandler cgi-wrapper .pl
> TransferLog /home/sites/www.dev.domain1.org/logs/access_log
> ErrorLog /home/sites/www.dev.domain1.org/logs/error_log
> #LogFormat "%{User-agent}i -> %U" agent
> #CustomLog /home/sites/www.domain1.org/logs/agent_log agent
> </VirtualHost>
> 
> 
> NameVirtualHost 127.0.0.1
> <VirtualHost dev.domain2.org www.dev.domain2.org>
> ServerName dev.domain2.org
> ServerAdmin admin
> DocumentRoot /home/sites/site5/web
> ServerAlias www.dev.domain2.org
> RewriteEngine on
> RewriteCond %{HTTP_HOST}                !^127.0.0.1(:80)?$
> RewriteCond %{HTTP_HOST}                !^www.dev.domain2.org(:80)?$
> RewriteRule ^/(.*)                      http://www.dev.domain2.org/$1
> [L,R]
> RewriteCond %{HTTP_HOST}                !^dev.domain2.org(:80)?$
> RewriteRule ^/(.*)                      http://dev.domain2.org/$1 [L,R]
> RewriteOptions inherit
> AliasMatch ^/~([^/]+)(/(.*))? /home/sites/site5/users/$1/web/$3
> AliasMatch ^/users/([^/]+)(/(.*))? /home/sites/site5/users/$1/web/$3
> AddHandler cgi-wrapper .cgi
> AddHandler cgi-wrapper .pl
> TransferLog /home/sites/www.dev.domain2.org/logs/access_log
> ErrorLog /home/sites/www.dev.domain2.org/logs/error_log
> #LogFormat "%{User-agent}i -> %U" agent
> #CustomLog /home/sites/www.domain2.org/logs/agent_log agent
> </VirtualHost>
> __end conf entries__
> 
> 
> ---------------------------------------------------------------------
> 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


---------------------------------------------------------------------
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