This is a discussion on HELP. virtualHosts in Apache2 on XP within the Windows Web Servers forums, part of the Web Server and Related Forums category; I installed Apache2 on my XP machine and the localhost is working, but I'm not able to get the ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I installed Apache2 on my XP machine and the localhost is working, but
I'm not able to get the virtualHost to work. Much appreciated Thanks my settings. Hosts file. Localhost 127.0.0.1 Daleeluck.com 127.0.0.1 httpd file <VirtualHost *> ServerName www.daleeluck.com ServerAdmin webmaster@daleeluck.com DocumentRoot "C:/Inetpub/wwwroot" Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> |
|
|||
|
Keith Bowes <do.not@spam.me> wrote in message news:<TWGKa.5365$yQ6.3109@fe01.atl2.webusenet.com> ...
> cahill wrote: > > I installed Apache2 on my XP machine and the localhost is working, but > > I'm not able to get the virtualHost to work. > > > > Much appreciated > > Thanks > > > > my settings. > > > > Hosts file. > > > > Localhost 127.0.0.1 > > Daleeluck.com 127.0.0.1 > > > > httpd file > > > > <VirtualHost *> > > ServerName www.daleeluck.com > > ServerAdmin webmaster@daleeluck.com > > DocumentRoot "C:/Inetpub/wwwroot" > > Options Indexes FollowSymLinks MultiViews > > AllowOverride All > > Order allow,deny > > Allow from all > > </Directory> > > </VirtualHost> > > Are you using "NameVirtualHost *"? yes i'm using "NameVirtualHost *" with the settings above it would serve the web page from C:/Inetpub/wwwroot the root directory of www.daleeluck.com not from E:\Program Files\Apache Group\Apache2\htdocs the root directory of local host "winxp" to get the local host to serve the web page from E:\Program Files\Apache Group\Apache2\htdocs i would have to comment out Documentroot c:/inetpub/wwwwroot. |
|
|||
|
Personally I like using the mod_vhost_alias best for virtual hosting, then:
UseCanonicalName Off #ScriptAlias /cgi-bin/ "C:/Program Files/Apache Group/Apache2/cgi-bin/" <-- comment this out if you want each vhost to run it's own cgi-bin directory. Then: # this log format can be split per-virtual-host based on the first field LogFormat "%V %h %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-agent}i\"" vcommon #CustomLog logs/access_log vcommon CustomLog E:/apache-root/logs/access_log vcommon # include the server name in the filenames used to satisfy requests VirtualDocumentRoot E:/apache-root/vhosts/%0 VirtualScriptAlias E:/apache-root/vhosts/%0/cgi-bin Now from now on every time you want a new virtual host you simply drop a folder of the same host name in the E:/apache-root/vhosts folder (or whatever path you have). You don't even have to restart apache when you add them! I also add this too: <Directory E:/apache-root/vhosts> Options Indexes ExecCGI AllowOverride Authconfig # lets .htaccess files work for authenitcation ScriptInterpreterSource registry # tells apache how to handle ..pl files </Directory> Rach |
| Thread Tools | |
| Display Modes | |
|
|