123456789101112131415161718192021222324252627282930313233 |
- # -*- mode: snippet -*-
- # name: vhost
- # key: vhost
- # --
- <VirtualHost 127.0.0.1:${1:port}>
- ServerName ${2:domain}
- ServerAlias www.${2:domain}
- ScriptAlias /cgi-bin /home/${3:web-root}/${2:domain}/www/cgi-bin
- DocumentRoot /home/${3:web-root}/${2:domain}/www
- <Directory /home/${3:web-root}/${2:domain}/www>
- Options +FollowSymLinks -MultiViews +Includes -ExecCGI
- DirectoryIndex index.php index.html index.htm
- Require all granted
- AllowOverride all
- </Directory>
- AddDefaultCharset UTF-8
- UseCanonicalName Off
- AddHandler server-parsed .shtml .shtm
- php_admin_flag allow_url_fopen on
- php_admin_value mbstring.func_overload 0
- # php_admin_value opcache.file_cache "/opcache/5cebd4b5b5259b00018a63f7"
- <IfModule mod_setenvif.c>
- SetEnvIf X-Forwarded-Proto https HTTPS=on
- SetEnvIf X-Forwarded-Proto https PORT=443
- </IfModule>
- <IfFile /home/${3:web-root}/logs>
- CustomLog /home/${3:web-root}/logs/www.${2:domain}-access.log common-time
- ErrorLog /home/${3:web-root}/logs/www.${2:domain}-error_log
- </IfFile>
- MaxClientsVHost 20
- AssignUserID "#${4:user}" "#${4:user}"
- </VirtualHost>
|