Skip to content

Instantly share code, notes, and snippets.

@qmmr
Created January 31, 2012 17:27
Show Gist options
  • Save qmmr/1711716 to your computer and use it in GitHub Desktop.
Save qmmr/1711716 to your computer and use it in GitHub Desktop.
vhost for xampp
#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
# Use name-based virtual hosting.
#
NameVirtualHost 127.0.0.1:80
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost 127.0.0.1:80>
  ServerAdmin webmaster@localhost
  DocumentRoot "C:/xampp/htdocs
  ServerName localhost
  <Directory "C:/xampp/htdocs">
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Order allow,deny
    Allow from all
  </Directory>
</VirtualHost>
# Shortcut for PHPMyAdmin
<VirtualHost *:80>
  DocumentRoot "C:/xampp/phpmyadmin
  ServerName pma
</VirtualHost>
# below setup as many local addresses as you want
# remember to set them in C:\Windows\System32\drivers\etc\hosts
#
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# 127.0.0.1 pma
# 127.0.0.1 name.local
### DEFAULT EXAMPLE ###
##<VirtualHost *:80>
##ServerAdmin postmaster@dummy-host.localhost
##DocumentRoot "C:/xampp/htdocs/dummy-host.localhost"
##ServerName dummy-host.localhost
##ServerAlias www.dummy-host.localhost
##ErrorLog "logs/dummy-host.localhost-error.log"
##CustomLog "logs/dummy-host.localhost-access.log" combined
##</VirtualHost>
<VirtualHost *:80>
    DocumentRoot "C:/xampp/htdocs/name/public"
    ServerName gcp.local
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment