I would like to use XAMPP for local development of Web sites built with Textpattern (an open-source CMS). What I really need is to be able to work on multiple sites, preferably all sitting in respective folders under one location...c:\sites\ (e.g., c:\sites\site1, c:\sites\site2, etc.)
My installation of XAMPP went fine, but I need some help with configuring the virtual host containers in the httpd.conf. I must have looked at twenty different examples all over the net, including the ones in the Textpattern wiki, but I can't get anything to work.
My hosts file I think is at least right...
- Code: Select all
127.0.0.1 localhost
127.0.0.1 site1.local.com
127.0.0.1 site2.local.com
But I think virtual host containers in the httpd.conf file is where the problem is, I just don't know what exactly. The way I have it below is exactly as it's discussed here...
- Code: Select all
NameVirtualHost 127.0.0.1:80
<VirtualHost 127.0.0.1:80>
ServerAdmin admin@localhost
DocumentRoot /apachefriends/xampp/htdocs/xampp
ServerName localhost
<Directory "/apachefriends/xampp/htdocs/xampp">
Options Indexes FollowSymLinks ExecCGI
</Directory>
</VirtualHost>
NameVirtualHost site1.local.com:80
<VirtualHost 127.0.0.1:80>
ServerAdmin admin@site1.local.com
DocumentRoot C:/MySites/site1
ServerName site1.local.com
<Directory C:/MySites/site1>
Options Indexes FollowSymLinks
AllowOverride FileInfo
</Directory>
</VirtualHost>
NameVirtualHost site2.local.com:80
<VirtualHost 127.0.0.1:80>
ServerAdmin admin@site2.local.com
DocumentRoot C:/MySites/site2
ServerName site2.local.com
<Directory C:/MySites/site2>
Options Indexes FollowSymLinks
AllowOverride FileInfo
</Directory>
</VirtualHost>
Oh, one other thing that might be killing me here. How do you know what your ServerAdmin is? I have it marked above as admin, but I don't have a clue, really, nor how I would go about finding out? (Is it the same as my admin username for my local machine?) I don't recall this ever being a step in the XAMPP install process.
cont... I don't think I've given enough to be fully explanatory, so here's a bit more.
A typical install of the CMS in my desired locations, with the target setup file, would be this...
- Code: Select all
c:/MySites/site1/textpattern/setup/index.php
and I'm under the impression, with virtual host containers set up correctly, I should be able to access the setup file in a browser by using...
- Code: Select all
http://site1.local.com/textpattern/setup/index.php
But in fact what I get is a 404 error saying "Object not found!", but the files are indeed there.