Skip to content

Instantly share code, notes, and snippets.

@octavian-nita
Last active December 30, 2015 12:49
Show Gist options
  • Save octavian-nita/7831920 to your computer and use it in GitHub Desktop.
Save octavian-nita/7831920 to your computer and use it in GitHub Desktop.
## ==> In C:\WINDOWS\system32\drivers\etc\hosts or /etc/hosts
#127.0.0.1 localhost
#127.0.0.1 cs2
## ==> In httpd.conf or apache2.conf
#Virtual hosts
#Include conf/extra/httpd-vhosts.conf
LoadModule php5_module "c:/Program Files/PHP/php5apache2_4.dll"
AddHandler application/x-httpd-php .php
<IfModule dir_module>
DirectoryIndex index.php index.html index.htm index.xhtml
</IfModule>
## ==> In httpd-vhosts.conf
NameVirtualHost *:80
# Listen 80 # Apache 2.4 seems not to start when this line is enabled...
<VirtualHost *:80>
ServerName localhost
#ServerAlias www.localhost.com
ServerAdmin mnothro@yahoo.com
DocumentRoot "C:/Apache24/htdocs"
<Directory "C:/Apache24/htdocs">
Options +Indexes +FollowSymLinks -MultiViews
AllowOverride All
Require all granted
# Replaces in 2.4:
#Order allow,deny
#Allow from all
</Directory>
ErrorLog "logs/localhost-error.log"
LogLevel warn
CustomLog "logs/localhost-access.log" combined
</VirtualHost>
<VirtualHost *:80>
ServerName cs2
#ServerAlias www.cs2.com
ServerAdmin mnothro@yahoo.com
DocumentRoot "D:/Workspace/cadeauxsucres2"
<Directory "D:/Workspace/cadeauxsucres2">
Options +Indexes +FollowSymLinks -MultiViews
AllowOverride All
Require all granted
# Replaces in 2.4:
#Order allow,deny
#Allow from all
</Directory>
ErrorLog "logs/cs2-error.log"
LogLevel warn
CustomLog "logs/cs2-access.log" combined
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment