| | |
| | | |
| | | <Directory {tmpl_var name='web_basedir'}/{tmpl_var name='domain'}> |
| | | AllowOverride None |
| | | <tmpl_if name='apache_version' op='>' value='2.2' format='version'> |
| | | Require all denied |
| | | <tmpl_else> |
| | | Order Deny,Allow |
| | | Deny from all |
| | | </tmpl_if> |
| | | </Directory> |
| | | |
| | | <tmpl_loop name="vhosts"> |
| | |
| | | <tmpl_if name='php' op='==' value='cgi'> |
| | | DocumentRoot <tmpl_var name='web_document_root'> |
| | | </tmpl_else> |
| | | DocumentRoot <tmpl_var name='web_document_root_www'> |
| | | <tmpl_if name='php' op='==' value='php-fpm'> |
| | | DocumentRoot <tmpl_var name='web_document_root'> |
| | | </tmpl_else> |
| | | <tmpl_if name='php' op='==' value='hhvm'> |
| | | DocumentRoot <tmpl_var name='web_document_root'> |
| | | </tmpl_else> |
| | | DocumentRoot <tmpl_var name='web_document_root_www'> |
| | | </tmpl_if> |
| | | </tmpl_if> |
| | | </tmpl_if> |
| | | </tmpl_if> |
| | | |
| | |
| | | </IfModule> |
| | | |
| | | <Directory {tmpl_var name='web_document_root_www'}> |
| | | Options FollowSymLinks |
| | | Options +FollowSymLinks |
| | | AllowOverride <tmpl_var name='allow_override'> |
| | | <tmpl_if name='apache_version' op='>' value='2.2' format='version'> |
| | | Require all granted |
| | | <tmpl_else> |
| | | Order allow,deny |
| | | Allow from all |
| | | </tmpl_if> |
| | | <tmpl_if name='ssi' op='==' value='y'> |
| | | |
| | | # ssi enabled |
| | |
| | | </tmpl_if> |
| | | <tmpl_if name='php' op='==' value='no'> |
| | | <Files ~ '.php[s3-6]{0,1}$'> |
| | | <tmpl_if name='apache_version' op='>' value='2.2' format='version'> |
| | | Require all denied |
| | | <tmpl_else> |
| | | Order allow,deny |
| | | Deny from all |
| | | Allow from none |
| | | </tmpl_if> |
| | | </Files> |
| | | </tmpl_if> |
| | | </Directory> |
| | | <Directory {tmpl_var name='web_document_root'}> |
| | | Options FollowSymLinks |
| | | Options +FollowSymLinks |
| | | AllowOverride <tmpl_var name='allow_override'> |
| | | <tmpl_if name='apache_version' op='>' value='2.2' format='version'> |
| | | Require all granted |
| | | <tmpl_else> |
| | | Order allow,deny |
| | | Allow from all |
| | | </tmpl_if> |
| | | <tmpl_if name='ssi' op='==' value='y'> |
| | | |
| | | # ssi enabled |
| | |
| | | </tmpl_if> |
| | | <tmpl_if name='php' op='==' value='no'> |
| | | <Files ~ '.php[s3-6]{0,1}$'> |
| | | Order allow,deny |
| | | Deny from all |
| | | Allow from none |
| | | <tmpl_if name='apache_version' op='>' value='2.2' format='version'> |
| | | Require all denied |
| | | <tmpl_else> |
| | | Order allow,deny |
| | | Deny from all |
| | | Allow from none |
| | | </tmpl_if> |
| | | </Files> |
| | | </tmpl_if> |
| | | </Directory> |
| | |
| | | </IfModule> |
| | | </tmpl_if> |
| | | |
| | | <tmpl_if name='perl' op='==' value='y'> |
| | | <IfModule mod_perl.c> |
| | | PerlModule ModPerl::Registry |
| | | PerlModule Apache2::Reload |
| | | <Directory {tmpl_var name='web_document_root_www'}> |
| | | PerlResponseHandler ModPerl::Registry |
| | | PerlOptions +ParseHeaders |
| | | Options +ExecCGI |
| | | </Directory> |
| | | <Directory {tmpl_var name='web_document_root'}> |
| | | PerlResponseHandler ModPerl::Registry |
| | | PerlOptions +ParseHeaders |
| | | Options +ExecCGI |
| | | </Directory> |
| | | <Files *.pl> |
| | | SetHandler perl-script |
| | | </Files> |
| | | </IfModule> |
| | | </tmpl_if> |
| | | |
| | | <tmpl_if name='python' op='==' value='y'> |
| | | <IfModule mod_python.c> |
| | | <Directory {tmpl_var name='web_document_root_www'}> |
| | | AddHandler mod_python .py |
| | | <FilesMatch "\.py$"> |
| | | SetHandler mod_python |
| | | </FilesMatch> |
| | | PythonHandler mod_python.publisher |
| | | PythonDebug On |
| | | </Directory> |
| | |
| | | <tmpl_if name='cgi' op='==' value='y'> |
| | | # cgi enabled |
| | | <Directory {tmpl_var name='document_root'}/cgi-bin> |
| | | <tmpl_if name='apache_version' op='>' value='2.2' format='version'> |
| | | Require all granted |
| | | <tmpl_else> |
| | | Order allow,deny |
| | | Allow from all |
| | | </tmpl_if> |
| | | </Directory> |
| | | ScriptAlias /cgi-bin/ <tmpl_var name='document_root'>/cgi-bin/ |
| | | AddHandler cgi-script .cgi |
| | | AddHandler cgi-script .pl |
| | | <FilesMatch "\.(cgi|pl)$"> |
| | | SetHandler cgi-script |
| | | </FilesMatch> |
| | | </tmpl_if> |
| | | <tmpl_if name='suexec' op='==' value='y'> |
| | | # suexec enabled |
| | |
| | | </IfModule> |
| | | </tmpl_if> |
| | | # Clear PHP settings of this website |
| | | <FilesMatch "\.ph(p3?|tml)$"> |
| | | <FilesMatch ".+\.ph(p[345]?|t|tml)$"> |
| | | SetHandler None |
| | | </FilesMatch> |
| | | <tmpl_if name='php' op='==' value='mod'> |
| | |
| | | # suphp enabled |
| | | <Directory {tmpl_var name='web_document_root'}> |
| | | <IfModule mod_suphp.c> |
| | | suPHP_Engine on |
| | | # suPHP_UserGroup <tmpl_var name='system_user'> <tmpl_var name='system_group'> |
| | | suPHP_Engine on |
| | | # suPHP_UserGroup <tmpl_var name='system_user'> <tmpl_var name='system_group'> |
| | | <tmpl_if name='has_custom_php_ini'> |
| | | suPHP_ConfigPath <tmpl_var name='custom_php_ini_dir'> |
| | | </tmpl_if> |
| | | AddHandler x-httpd-suphp .php .php3 .php4 .php5 |
| | | suPHP_AddHandler x-httpd-suphp |
| | | <FilesMatch "\.php[345]?$"> |
| | | SetHandler x-httpd-suphp |
| | | </FilesMatch> |
| | | suPHP_AddHandler x-httpd-suphp |
| | | </IfModule> |
| | | </Directory> |
| | | </tmpl_if> |
| | |
| | | # php as cgi enabled |
| | | ScriptAlias /php5-cgi <tmpl_var name='cgi_starter_path'><tmpl_var name='cgi_starter_script'> |
| | | Action php5-cgi /php5-cgi |
| | | AddHandler php5-cgi .php .php3 .php4 .php5 |
| | | <FilesMatch "\.php[345]?$"> |
| | | SetHandler php5-cgi |
| | | </FilesMatch> |
| | | <Directory {tmpl_var name='cgi_starter_path'}> |
| | | Order allow,deny |
| | | Allow from all |
| | | <tmpl_if name='apache_version' op='>' value='2.2' format='version'> |
| | | Require all granted |
| | | <tmpl_else> |
| | | Order allow,deny |
| | | Allow from all |
| | | </tmpl_if> |
| | | </Directory> |
| | | </tmpl_if> |
| | | <tmpl_if name='php' op='==' value='fast-cgi'> |
| | |
| | | FcgidIdleTimeout 300 |
| | | FcgidProcessLifeTime 3600 |
| | | # FcgidMaxProcesses 1000 |
| | | FcgidMaxRequestsPerProcess <tmpl_var name='fastcgi_max_requests'> |
| | | FcgidMinProcessesPerClass 0 |
| | | FcgidMaxProcessesPerClass 100 |
| | | FcgidMaxProcessesPerClass 10 |
| | | FcgidConnectTimeout 3 |
| | | FcgidIOTimeout 360 |
| | | FcgidBusyTimeout 300 |
| | | FcgidMaxRequestLen 1073741824 |
| | | FcgidIOTimeout 600 |
| | | FcgidBusyTimeout 3600 |
| | | FcgidMaxRequestLen 1073741824 |
| | | <tmpl_else> |
| | | IdleTimeout 300 |
| | | ProcessLifeTime 3600 |
| | |
| | | DefaultMinClassProcessCount 0 |
| | | DefaultMaxClassProcessCount 100 |
| | | IPCConnectTimeout 3 |
| | | IPCCommTimeout 360 |
| | | BusyTimeout 300 |
| | | IPCCommTimeout 600 |
| | | BusyTimeout 3600 |
| | | </tmpl_if> |
| | | </IfModule> |
| | | <Directory {tmpl_var name='web_document_root_www'}> |
| | | AddHandler fcgid-script .php .php3 .php4 .php5 |
| | | <FilesMatch "\.php[345]?$"> |
| | | SetHandler fcgid-script |
| | | </FilesMatch> |
| | | FCGIWrapper <tmpl_var name='fastcgi_starter_path'><tmpl_var name='fastcgi_starter_script'> .php |
| | | FCGIWrapper <tmpl_var name='fastcgi_starter_path'><tmpl_var name='fastcgi_starter_script'> .php3 |
| | | FCGIWrapper <tmpl_var name='fastcgi_starter_path'><tmpl_var name='fastcgi_starter_script'> .php4 |
| | | FCGIWrapper <tmpl_var name='fastcgi_starter_path'><tmpl_var name='fastcgi_starter_script'> .php5 |
| | | Options +ExecCGI |
| | | AllowOverride <tmpl_var name='allow_override'> |
| | | <tmpl_if name='apache_version' op='>' value='2.2' format='version'> |
| | | Require all granted |
| | | <tmpl_else> |
| | | Order allow,deny |
| | | Allow from all |
| | | </tmpl_if> |
| | | </Directory> |
| | | <Directory {tmpl_var name='web_document_root'}> |
| | | AddHandler fcgid-script .php .php3 .php4 .php5 |
| | | <FilesMatch "\.php[345]?$"> |
| | | SetHandler fcgid-script |
| | | </FilesMatch> |
| | | FCGIWrapper <tmpl_var name='fastcgi_starter_path'><tmpl_var name='fastcgi_starter_script'> .php |
| | | FCGIWrapper <tmpl_var name='fastcgi_starter_path'><tmpl_var name='fastcgi_starter_script'> .php3 |
| | | FCGIWrapper <tmpl_var name='fastcgi_starter_path'><tmpl_var name='fastcgi_starter_script'> .php4 |
| | | FCGIWrapper <tmpl_var name='fastcgi_starter_path'><tmpl_var name='fastcgi_starter_script'> .php5 |
| | | Options +ExecCGI |
| | | AllowOverride <tmpl_var name='allow_override'> |
| | | <tmpl_if name='apache_version' op='>' value='2.2' format='version'> |
| | | Require all granted |
| | | <tmpl_else> |
| | | Order allow,deny |
| | | Allow from all |
| | | </tmpl_if> |
| | | </Directory> |
| | | </tmpl_if> |
| | | <tmpl_if name='php' op='==' value='php-fpm'> |
| | | <IfModule mod_fastcgi.c> |
| | | <Directory /usr/lib/cgi-bin> |
| | | Order allow,deny |
| | | Allow from all |
| | | </Directory> |
| | | AddHandler php5-fcgi .php |
| | | Action php5-fcgi /php5-fcgi |
| | | Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi |
| | | <Directory {tmpl_var name='document_root'}/cgi-bin> |
| | | <tmpl_if name='apache_version' op='>' value='2.2' format='version'> |
| | | Require all granted |
| | | <tmpl_else> |
| | | Order allow,deny |
| | | Allow from all |
| | | </tmpl_if> |
| | | </Directory> |
| | | <FilesMatch "\.php[345]?$"> |
| | | SetHandler php5-fcgi |
| | | </FilesMatch> |
| | | Action php5-fcgi /php5-fcgi |
| | | Alias /php5-fcgi {tmpl_var name='document_root'}/cgi-bin/php5-fcgi-{tmpl_var name='ip_address'}-{tmpl_var name='port'}-{tmpl_var name='domain'} |
| | | <tmpl_if name='use_tcp'> |
| | | FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:<tmpl_var name='fpm_port'> -pass-header Authorization |
| | | FastCgiExternalServer {tmpl_var name='document_root'}/cgi-bin/php5-fcgi-{tmpl_var name='ip_address'}-{tmpl_var name='port'}-{tmpl_var name='domain'} -idle-timeout 300 -host 127.0.0.1:<tmpl_var name='fpm_port'> -pass-header Authorization |
| | | </tmpl_if> |
| | | <tmpl_if name='use_socket'> |
| | | FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket <tmpl_var name='fpm_socket'> -pass-header Authorization |
| | | FastCgiExternalServer {tmpl_var name='document_root'}/cgi-bin/php5-fcgi-{tmpl_var name='ip_address'}-{tmpl_var name='port'}-{tmpl_var name='domain'} -idle-timeout 300 -socket <tmpl_var name='fpm_socket'> -pass-header Authorization |
| | | </tmpl_if> |
| | | </IfModule> |
| | | </tmpl_if> |
| | | |
| | | <tmpl_if name='php' op='==' value='hhvm'> |
| | | <IfModule mod_fastcgi.c> |
| | | <Directory {tmpl_var name='document_root'}/cgi-bin> |
| | | <tmpl_if name='apache_version' op='>' value='2.2' format='version'> |
| | | Require all granted |
| | | <tmpl_else> |
| | | Order allow,deny |
| | | Allow from all |
| | | </tmpl_if> |
| | | </Directory> |
| | | <FilesMatch "\.php[345]?$"> |
| | | SetHandler php5-fcgi |
| | | </FilesMatch> |
| | | Action php5-fcgi /php5-fcgi |
| | | Alias /php5-fcgi {tmpl_var name='document_root'}/cgi-bin/php5-fcgi-{tmpl_var name='ip_address'}-{tmpl_var name='port'}-{tmpl_var name='domain'} |
| | | FastCgiExternalServer {tmpl_var name='document_root'}/cgi-bin/php5-fcgi-{tmpl_var name='ip_address'}-{tmpl_var name='port'}-{tmpl_var name='domain'} -idle-timeout 300 -socket /var/run/hhvm/hhvm.<tmpl_var name='system_user'>.sock -pass-header Authorization |
| | | </IfModule> |
| | | </tmpl_if> |
| | | |
| | | <tmpl_if name="rewrite_enabled"> |
| | | RewriteEngine on |
| | | <tmpl_if name='seo_redirect_enabled'> |
| | | RewriteCond %{HTTP_HOST} ^<tmpl_var name='seo_redirect_origin_domain'>$ [NC] |
| | | RewriteRule ^(.*)$ http://<tmpl_var name='seo_redirect_target_domain'>$1 [R=301,L] |
| | | RewriteCond %{HTTP_HOST} <tmpl_var name='seo_redirect_operator'>^<tmpl_var name='seo_redirect_origin_domain'>$ [NC] |
| | | RewriteRule ^(.*)$ http<tmpl_if name='ssl_enabled'>s</tmpl_if>://<tmpl_var name='seo_redirect_target_domain'>$1 [R=301,L] |
| | | </tmpl_if> |
| | | <tmpl_loop name="alias_seo_redirects"> |
| | | RewriteCond %{HTTP_HOST} <tmpl_var name='alias_seo_redirect_operator'>^<tmpl_var name='alias_seo_redirect_origin_domain'>$ [NC] |
| | | RewriteRule ^(.*)$ http<tmpl_if name='ssl_enabled'>s</tmpl_if>://<tmpl_var name='alias_seo_redirect_target_domain'>$1 [R=301,L] |
| | | </tmpl_loop> |
| | | <tmpl_loop name="redirects"> |
| | | RewriteCond %{HTTP_HOST} <tmpl_var name='rewrite_domain'>$ [NC] |
| | | RewriteCond %{REQUEST_URI} !^/webdav/ |
| | | RewriteRule ^/(.*)$ <tmpl_var name='rewrite_target'>$1 <tmpl_var name='rewrite_type'> |
| | | <tmpl_if name="rewrite_is_url" op="==" value="n"> |
| | | RewriteCond %{REQUEST_URI} !^/webdav/ |
| | | RewriteCond %{REQUEST_URI} !^/php5-fcgi/ |
| | | RewriteCond %{REQUEST_URI} !^<tmpl_var name='rewrite_target'> |
| | | </tmpl_if> |
| | | RewriteRule ^/(.*)$ <tmpl_var name='rewrite_target'><tmpl_if name="rewrite_add_path" op="==" value="y">$1</tmpl_if> <tmpl_var name='rewrite_type'> |
| | | </tmpl_loop> |
| | | </tmpl_if> |
| | | |
| | |
| | | |
| | | <tmpl_var name='apache_directives'> |
| | | </VirtualHost> |
| | | </tmpl_loop> |
| | | </tmpl_loop> |