Last active
October 1, 2016 22:43
-
-
Save GhazanfarMir/c389a5b978fd06e9edcf4eb98999e59f to your computer and use it in GitHub Desktop.
Apache Virtual Hosts with Wildcards in case of Multi sites setup in sub domain
This file contains hidden or 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
<VirtualHost *:80> | |
ServerAdmin [email protected] | |
DocumentRoot "/opt/lampp/htdocs/demo" | |
ServerName demo.ghazanfarmir.local | |
ServerAlias *.demo.ghazanfarmir.local # fr.demo.ghazanfarmir.local, de.demo.ghazanfarmir.local, ch.demo.ghazanfarmir.local | |
<Directory "/opt/lampp/htdocs/demo"> | |
Options Indexes FollowSymLinks Includes execCGI | |
AllowOverride All | |
Require all granted | |
</Directory> | |
</VirtualHost> | |
# Note that the ServerName remains as the domain, | |
# however, ServerAlias uses the wildcard instead of specifying each sub domain. | |
# Please remember, you hosts file still needs to have individual sub-domain | |
# declaration. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment