Skip to content

Instantly share code, notes, and snippets.

@rumbis
Last active October 3, 2022 02:10
Show Gist options
  • Save rumbis/c1c8dd98dda7c65ed911b54e0603807b to your computer and use it in GitHub Desktop.
Save rumbis/c1c8dd98dda7c65ed911b54e0603807b to your computer and use it in GitHub Desktop.
proxypass with apche 2.4 appwrite
SuexecUserGroup "#1020" "#1007"
ServerName example.example.example
ServerAlias www.example.example.example
ServerAlias mail.example.example.example
ServerAlias webmail.example.example.example
ServerAlias admin.example.example.example
DocumentRoot /home/example/public_html
ErrorLog /var/log/virtualmin/example.example.example_error_log
CustomLog /var/log/virtualmin/example.example.example_access_log combined
ScriptAlias /cgi-bin/ /home/example/cgi-bin/
DirectoryIndex index.php index.php4 index.php5 index.htm index.html
<Directory /home/example/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
Require all granted
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
AddType application/x-httpd-php .php
AddHandler fcgid-script .php
AddHandler fcgid-script .php7.1
AddHandler fcgid-script .php7.3
AddHandler fcgid-script .php7.4
AddHandler fcgid-script .php8.1
FCGIWrapper /home/example/fcgi-bin/php8.1.fcgi .php
FCGIWrapper /home/example/fcgi-bin/php7.1.fcgi .php7.1
FCGIWrapper /home/example/fcgi-bin/php7.3.fcgi .php7.3
FCGIWrapper /home/example/fcgi-bin/php7.4.fcgi .php7.4
FCGIWrapper /home/example/fcgi-bin/php8.1.fcgi .php8.1
</Directory>
<Directory /home/example/cgi-bin>
Require all granted
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
</Directory>
ProxyPass /.well-known !
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.example.example.example
RewriteRule ^(?!/.well-known)(.*) https://example.example.example:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.example.example.live
RewriteRule ^(?!/.well-known)(.*) https://example.example.example:10000/ [R]
RemoveHandler .php
RemoveHandler .php7.1
RemoveHandler .php7.3
RemoveHandler .php7.4
RemoveHandler .php8.1
FcgidMaxRequestLen 1073741824
ProxyPass / https://127.0.0.1:7443/
ProxyPassReverse / https://127.0.0.1:7443/
SSLProxyEngine on
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
SSLEngine on
SSLCertificateFile /etc/ssl/virtualmin/166460238821045/ssl.combined
SSLCertificateKeyFile /etc/ssl/virtualmin/166460238821045/ssl.key
SSLCACertificateFile /etc/ssl/virtualmin/166460238821045/ssl.ca
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
ProxyPassReverseCookieDomain "127.0.0.1:7443" "example.example.example"
ProxyPreserveHost On
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment