the_oliver Posted December 10, 2006 Share Posted December 10, 2006 Hi, im trying to configure virtual hosting, under Apache 2 on a Linux centOS box. What i wand is for it to be able to cope with mass vertual hosting, with out me having to eddit the conf each time i add a new site. I did some resurch and found i can do this through the using the mod_vhost_alias function, and the code pasted below. I think that is is supposed to work so that all i have to do is create a file with the sites name and it will look for this when a request is made:[code]# get the server name from the Host: headerUseCanonicalName OFF# this log format can be split per-virtual-host based on the first fieldLogFormat "%V %h %l %u %t \"%r\" %s %b" vcommonCustomLog logs/access_log vcommon# include the server name in the filenames used to satisfy requestsVirtualDocumentRoot /var/www/html/%0/docsVirtualScriptAlias /var/www/html/%0/cgi-bin[/code]So i posted this at the bottome of my httpd.conf and restarted apache. However whenever i try it i get: The requested URL / was not found on this server.What have i missed? Sugestions would be gratley appreshaited. Thanks!(oh:[quote][[email protected]]# httpd -SVirtualHost configuration:wildcard NameVirtualHosts and _default_ servers:_default_:443 bla.bla-bla.net (/etc/httpd/conf.d/ssl.conf:88)Syntax OK[/quote]) Quote Link to comment https://forums.phpfreaks.com/topic/30117-mass-virtual-hosting/ Share on other sites More sharing options...
the_oliver Posted December 13, 2006 Author Share Posted December 13, 2006 *bump Quote Link to comment https://forums.phpfreaks.com/topic/30117-mass-virtual-hosting/#findComment-140023 Share on other sites More sharing options...
steviewdr Posted December 13, 2006 Share Posted December 13, 2006 Did you check the apache logs?What does it say in the access logs when you try to access http://host/I know ppl who used mod_vhost_alias and it was a case of trial and error and testing.-steve Quote Link to comment https://forums.phpfreaks.com/topic/30117-mass-virtual-hosting/#findComment-140287 Share on other sites More sharing options...
dbrimlow Posted December 15, 2006 Share Posted December 15, 2006 You can try the NameVirtualHost directive. Just type in your local IP.NameVirtualHost 123.12.12.123:*# The NameVirtualHost directive is a required directive if you want to# configure name-based virtual hosts. Quote Link to comment https://forums.phpfreaks.com/topic/30117-mass-virtual-hosting/#findComment-141913 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.