Skip to content

Instantly share code, notes, and snippets.

@aborruso
Last active December 13, 2021 14:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aborruso/e0ef54e8849cdcd8d1b2a54a842f752b to your computer and use it in GitHub Desktop.
Save aborruso/e0ef54e8849cdcd8d1b2a54a842f752b to your computer and use it in GitHub Desktop.
<VirtualHost *:443>
SuexecUserGroup "#1000" "#1000"
ServerName wp.ondata.it
ServerAlias www.wp.ondata.it
ServerAlias webmail.wp.ondata.it
ServerAlias admin.wp.ondata.it
DocumentRoot /home/ondata/domains/wp.ondata.it/public_html
ErrorLog /var/log/virtualmin/wp.ondata.it_error_log
CustomLog /var/log/virtualmin/wp.ondata.it_access_log combined
ScriptAlias /cgi-bin/ /home/ondata/domains/wp.ondata.it/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/ondata/domains/wp.ondata.it/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
AddType application/x-httpd-php .php
AddHandler fcgid-script .php
AddHandler fcgid-script .php5
AddHandler fcgid-script .php7.0
#FCGIWrapper /home/ondata/domains/wp.ondata.it/fcgi-bin/php7.0.fcgi .php
FCGIWrapper /home/ondata/domains/wp.ondata.it/fcgi-bin/php5.fcgi .php
FCGIWrapper /home/ondata/domains/wp.ondata.it/fcgi-bin/php5.fcgi .php5
FCGIWrapper /home/ondata/domains/wp.ondata.it/fcgi-bin/php7.0.fcgi .php7.0
</Directory>
<Directory /home/ondata/domains/wp.ondata.it/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.wp.ondata.it
RewriteRule ^(.*) https://wp.ondata.it:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.wp.ondata.it
RewriteRule ^(.*) https://wp.ondata.it:48121/ [R]
RemoveHandler .php
RemoveHandler .php5
RemoveHandler .php7.0
php_admin_value engine Off
IPCCommTimeout 31
FcgidMaxRequestLen 1073741824
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/blog.ondata.it/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/blog.ondata.it/privkey.pem
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment