vhost-bitrix 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # -*- mode: snippet -*-
  2. # name: vhost
  3. # key: vhost
  4. # --
  5. <VirtualHost 127.0.0.1:${1:port}>
  6. ServerName ${2:domain}
  7. ServerAlias www.${2:domain}
  8. ScriptAlias /cgi-bin /home/${3:web-root}/${2:domain}/www/cgi-bin
  9. DocumentRoot /home/${3:web-root}/${2:domain}/www
  10. <Directory /home/${3:web-root}/${2:domain}/www>
  11. Options +FollowSymLinks -MultiViews +Includes -ExecCGI
  12. DirectoryIndex index.php index.html index.htm
  13. Require all granted
  14. AllowOverride all
  15. </Directory>
  16. AddDefaultCharset UTF-8
  17. UseCanonicalName Off
  18. AddHandler server-parsed .shtml .shtm
  19. php_admin_flag allow_url_fopen off
  20. php_admin_value mbstring.func_overload 2
  21. php_admin_value mbstring.internal_encoding UTF-8
  22. php_admin_flag display_errors off
  23. php_admin_flag session.use_trans_sid off
  24. php_admin_value max_input_vars 10000
  25. php_admin_value opcache.max_accelerated_files 100003
  26. php_admin_value realpath_cache_size 4194304
  27. php_admin_value request_order GP
  28. php_admin_flag allow_url_include off
  29. php_admin_value opcache.revalidate_freq 0
  30. # php_admin_value opcache.file_cache "/opcache/5cebd4b5b5259b00018a63f7"
  31. <IfModule mod_setenvif.c>
  32. SetEnvIf X-Forwarded-Proto https HTTPS=on
  33. SetEnvIf X-Forwarded-Proto https PORT=443
  34. </IfModule>
  35. <IfFile /home/${3:web-root}/logs>
  36. CustomLog /home/${3:web-root}/logs/www.${2:domain}-access.log common-time
  37. ErrorLog /home/${3:web-root}/logs/www.${2:domain}-error_log
  38. </IfFile>
  39. MaxClientsVHost 20
  40. AssignUserID "#${4:user}" "#${4:user}"
  41. </VirtualHost>