Sure
Code
- <VirtualHost 0.0.0.0:443>
- ServerAdmin webmaster@xxx.be
- ServerName xxx.be
- ServerAlias www.xxx.be vu2009als3.ds01.xxx.be
- DocumentRoot /var/www/virtual/xxx.eu/xxx.be/htdocs
- DirectoryIndex index.html index.xhtml index.htm
- LogLevel error
- ErrorLog /var/log/apache2/xxx.be/error.log
- Alias /errors/ /var/www/virtual/xxx.eu/errors/
- SSLEngine On
- SSLCertificateFile /var/www/imscp/gui/data/certs/xxx.be.pem
- SSLCertificateChainFile /var/www/imscp/gui/data/certs/xxx.be.pem
- Header always set Strict-Transport-Security "max-age=0; includeSubDomains"
- AssignUserID vu2009 vu2009
- SuexecUserGroup vu2009 vu2009
- DirectoryIndex index.php
- Alias /php-fcgi /var/lib/apache2/fastcgi/php-fcgi-xxx.be
- FastCGIExternalServer /var/lib/apache2/fastcgi/php-fcgi-xxx.be \
- -socket /run/php/php7.1-fpm-xxx.be.sock \
- -idle-timeout 900 \
- -pass-header Authorization
- <Proxy "unix:/run/php/php7.1-fpm-xxx.be.sock|fcgi://xxx.be" retry=0>
- ProxySet connectiontimeout=5 timeout=7200
- </Proxy>
- <Directory /var/www/virtual/xxx.eu>
- Options +SymLinksIfOwnerMatch
- Require all granted
- </Directory>
- <Directory /var/www/virtual/xxx.eu/xxx.be/htdocs>
- AllowOverride AuthConfig Indexes Limit Options=Indexes \
- Fileinfo=RewriteEngine,RewriteOptions,RewriteBase,RewriteCond,RewriteRule
- AllowOverride All
- Options +ExecCGI
- FCGIWrapper {PHP_FCGI_STARTER_DIR}/{FCGID_NAME}/php-fcgi-starter
- Options +ExecCGI
- FCGIWrapper {PHP_FCGI_STARTER_DIR}/{FCGID_NAME}/php-fcgi-starter
- php_admin_value open_basedir "/var/www/virtual/xxx.eu/:/usr/share/php/:dev/random:/dev/urandom"
- php_admin_value upload_tmp_dir "{TMPDIR}"
- php_admin_value session.save_path "{TMPDIR}"
- php_admin_value soap.wsdl_cache_dir "{TMPDIR}"
- php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f webmaster@{EMAIL_DOMAIN}"
- php_admin_value max_execution_time 30
- php_admin_value max_input_time 60
- php_admin_value memory_limit "128M"
- php_flag display_errors off
- php_admin_value post_max_size "8M"
- php_admin_value upload_max_filesize "2M"
- php_admin_flag allow_url_fopen off
- <If "%{REQUEST_FILENAME} =~ /\.ph(?:p[3457]?|t|tml)$/ && -f %{REQUEST_FILENAME}">
- SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
- SetHandler proxy:fcgi://xxx.be
- </If>
- </Directory>
- Alias /cgi-bin/ /var/www/virtual/xxx.eu/xxx.be/cgi-bin/
- <Directory /var/www/virtual/xxx.eu/xxx.be/cgi-bin>
- AllowOverride AuthConfig Indexes Limit Options=Indexes
- DirectoryIndex index.cgi index.pl index.py index.rb
- Options +ExecCGI -MultiViews
- AddHandler cgi-script .cgi .pl .py .rb
- </Directory>
- php_admin_flag engine off
- RemoveHandler .php .php3 .php4 .php5 .php7 .pht .phtml
- RemoveHandler .php .php3 .php4 .php5 .php7 .pht .phtml
- <Directory /var/www/virtual/xxx.eu/xxx.be/htdocs>
- AllowOverride AuthConfig Indexes Limit Options=Indexes \
- Fileinfo=RewriteEngine,RewriteOptions,RewriteBase,RewriteCond,RewriteRule
- Require all granted
- </Directory>
- Require all granted
- </Directory>
- RedirectMatch 301 ^/((?!(?:awstatsicons|errors|stats|\.well-known)/).*) https://xxx.eu/$1
- <Location /stats>
- ProxyPreserveHost Off
- ProxyPass http://127.0.0.1:8889/stats/xxx.be retry=1 acquire=3000 timeout=600 Keepalive=On
- ProxyPassReverse http://127.0.0.1:8889/stats/xxx.be
- </Location>
- Include /etc/apache2/imscp/xxx.be.conf
- </VirtualHost>