Created
December 20, 2018 20:21
-
-
Save serverok/3d2e43bb951ded9a42ce8bc0c2c3b627 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a2enmod proxy | |
a2enmod proxy_fcgi | |
<VirtualHost _default_:443> | |
ServerName "serverok.in" | |
<FilesMatch ".+\.ph(p[345]?|t|tml)$"> | |
SetHandler application/x-httpd-php | |
</FilesMatch> | |
<FilesMatch ".+\.phps$"> | |
SetHandler application/x-httpd-php-source | |
Require all denied | |
</FilesMatch> | |
DocumentRoot /home/app | |
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9009/home/app/$1 timeout=120 | |
DirectoryIndex /index.php index.php | |
<Directory /home/app> | |
Options -Indexes +FollowSymLinks +MultiViews | |
AllowOverride None | |
Order allow,deny | |
allow from all | |
AllowOverride FileInfo All | |
Require all granted | |
Options ExecCGI | |
SetHandler fastcgi-script | |
</Directory> | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
LogLevel warn | |
CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined | |
SSLEngine on | |
SSLCertificateFile /root/ssl.crt | |
SSLCertificateKeyFile /root/ssl.key | |
SSLCACertificateFile /root/ca-bundle.crt | |
SSLOptions +FakeBasicAuth +ExportCertData | |
<FilesMatch "\.(cgi|shtml|phtml|php)$"> | |
SSLOptions +StdEnvVars +FakeBasicAuth +ExportCertData | |
</FilesMatch> | |
<Directory /usr/lib/cgi-bin> | |
SSLOptions +StdEnvVars +FakeBasicAuth +ExportCertData +StrictRequire | |
</Directory> | |
BrowserMatch "MSIE [2-6]" \ | |
nokeepalive ssl-unclean-shutdown \ | |
downgrade-1.0 force-response-1.0 | |
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment