httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Colson <scol...@westpole.com>
Subject Re: [users@httpd] Name based virtual hosts
Date Fri, 31 Jan 2003 15:24:17 GMT
Tried it again after reading that, got the same error:
"# apachectl restart
Shutting down Web Service: httpd
Setting up Web Service: [Fri Jan 31 10:22:14 2003] [warn] 
NameVirtualHost 69.0.x.x:80 has no VirtualHosts
/usr/sbin/httpd"

I've changed the IP in this example so that we can get off of that 
whole loopback issue, but it has stayed the same in the actual config 
file (the IP here, but with the x's filled in properly).

Having done a line by line comparison of these two virtual host blocks 
(the top one works, and has worked), the only difference is domain1 vs 
domain2. Further ideas? New config below.

Thanks,
-s


On Friday, Jan 31, 2003, at 10:01 America/Detroit, Joshua Slive wrote:

>
> On Fri, 31 Jan 2003, Stephen Colson wrote:
>> 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.
>
> There are several different things wrong with your configuration.  But
> perhaps the best advice I can give you is to carefully read:
> http://httpd.apache.org/docs/vhosts/name-based.html
>
> If you make your configuration look like the same one there, and it 
> still
> doesn't work, then come back for more help.
>
> Joshua.

__begin conf block__
NameVirtualHost 69.0.x.x
<VirtualHost 69.0.x.x>
ServerName dev.domain1.org
ServerAdmin admin
DocumentRoot /home/sites/site4/web
ServerAlias dev.domain1.org www.dev.domain1.org
RewriteEngine on
RewriteCond %{HTTP_HOST}                !^69.0.x.x(: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 69.0.x.x
<VirtualHost 69.0.x.x>
ServerName dev.domain2.org
ServerAdmin admin
DocumentRoot /home/sites/site5/web
ServerAlias dev.domain2.org www.dev.domain2.org
RewriteEngine on
RewriteCond %{HTTP_HOST}                !^69.0.x.x(: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 block__


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