Home > Windows > XAMPP virtual hosts multiple sites

XAMPP virtual hosts multiple sites

To set up multiple sites with XAMPP for development you’ll need to edit the following files.
xampp\apache\conf\extra\httpd-vhosts.conf
xampp\apache\conf\httpd.conf
%SystemRoot%\system32\drivers\etc\hosts

Any line followed with a ## texthere was edited and the following text was the original setup.

Only do this on a local dev enviroment
httpd.conf

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny ## Order deny,allow
    Allow from all ## Deny from all
</Directory>

hosts

127.0.0.1 your.site.for.URI

httpd-vhosts.conf

## Uncomment the following line
NameVirtualHost *:80

## Add for each host you want.
<VirtualHost *:80>
    ServerAdmin postmaster@mysitedev
    DocumentRoot "C:\my\site\root\dir"
    ServerName mysitedev
    ErrorLog "logs/mysitedev-error.log"
    CustomLog "logs/mysitedev.log" combined
</VirtualHost>
Advertisements
Categories: Windows
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: