Last active
April 1, 2017 23:26
-
-
Save AntoscencoVladimir/6909af046edc1ae7ed2d6634e2ccc3a7 to your computer and use it in GitHub Desktop.
Dynamically configured mass virtual hosting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UseCanonicalName Off | |
LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon | |
<VirtualHost *:80> | |
# Store sites in yourPath/sites/others | |
# example.loc , example2.loc etc. | |
ServerAlias *.loc | |
VirtualDocumentRoot "/home/antoscenco/sites/others/%0" | |
<Directory "/home/antoscenco/sites/others/*"> | |
DirectoryIndex index.php index.html index.htm | |
Require all granted | |
</Directory> | |
</VirtualHost> | |
#Symfony | |
<VirtualHost *:80> | |
# Store sites in yourPath/sites/symfony | |
# example.local , example2.local etc. | |
ServerAlias *.local | |
VirtualDocumentRoot "/home/antoscenco/sites/symfony/%0/web" | |
<Directory "/home/antoscenco/sites/symfony"> | |
DirectoryIndex app.php | |
Require all granted | |
</Directory> | |
</VirtualHost> | |
#add your sites in /etc/hosts file like | |
127.0.0.1 example.loc | |
127.0.0.1 example.local | |
etc. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment