File: //etc/apache2/sites-enabled/017-intranet.2am.tech.conf
<VirtualHost *:80>
ServerName intranet.2am.tech
DocumentRoot /var/www/vhosts/intranet.2am.tech/docroot
<Directory /var/www/vhosts/intranet.2am.tech/docroot>
Options FollowSymLinks
AllowOverride All
<IfModule setenvif_module>
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
</IfModule>
<FilesMatch ".+\.ph(ar|p|tml)$">
SetHandler "proxy:unix:/run/php/intranet.2am.tech.sock|fcgi://intranet.2am.tech"
</FilesMatch>
<FilesMatch ".+\.phps$">
Require all denied
</FilesMatch>
<FilesMatch "^\.ph(ar|p|ps|tml)$">
Require all denied
</FilesMatch>
</Directory>
RedirectMatch 404 /\.git
ErrorLog ${APACHE_LOG_DIR}/intranet.2am.tech-error_log
CustomLog ${APACHE_LOG_DIR}/intranet.2am.tech-access_log common
RewriteEngine on
RewriteCond %{SERVER_NAME} =intranet.2am.tech
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>