Created
May 4, 2012 22:19
-
-
Save LeZuse/2598085 to your computer and use it in GitHub Desktop.
Apache mod_macro example
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
# Place in mods-enabled folder (or symlink here) | |
<Macro VHostSetup $name> | |
ServerName $name | |
ServerAlias www.$name | |
ServerAdmin administrator@$name | |
DocumentRoot /var/www/apache/$name/$name | |
<Directory /var/www/apache/$name/$name> | |
Order allow,deny | |
Allow from all | |
Options FollowSymLinks | |
AllowOverride All | |
</Directory> | |
ErrorLog ${APACHE_LOG_DIR}/$name.log | |
LogLevel warn | |
CustomLog ${APACHE_LOG_DIR}/$name.log combined | |
</Macro> |
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
# Place in sites-enabled folder (or symlink here) | |
<VirtualHost *:80> | |
Use VHostSetup example.com | |
# Additional directives | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am having issues enabling the macro from a separate file. Was there anything special you had to do in order to allow the macro to be placed into mod_enable and still be used in sites-enabled?