From b29e8daffdfe8a21f9b4612150e330fee8aaf1f4 Mon Sep 17 00:00:00 2001 From: Bernhard Scheirle Date: Fri, 7 Aug 2015 16:07:50 +0200 Subject: [PATCH] Adds example apache proxy configuration --- contrib/apache_proxy_example.conf | 78 +++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 contrib/apache_proxy_example.conf diff --git a/contrib/apache_proxy_example.conf b/contrib/apache_proxy_example.conf new file mode 100644 index 0000000..f6b6ff6 --- /dev/null +++ b/contrib/apache_proxy_example.conf @@ -0,0 +1,78 @@ +# Location /etc/apache2/sites-enabled +# requires: rewrite + + ServerName upload.yoursite.tld + ServerAdmin webmaster@yoursite.tld + + + RewriteEngine On + RewriteCond %{HTTPS} off + RewriteRule ^/(.*) https://upload.yoursite.tld/$1 + + Redirect / https://upload.yoursite.tld/ + + ErrorLog ${APACHE_LOG_DIR}/error.log + CustomLog ${APACHE_LOG_DIR}/access.log combined + + + + + ServerName upload.yoursite.tld + ServerAdmin webmaster@yoursite.tld + + # The `storage_path` from your component config + DocumentRoot /var/www/blobstorage + + AllowOverride None + Options -Indexes -ExecCGI + SetHandler none + SetHandler default-handler + + Options -ExecCGI + php_flag engine off + RemoveHandler .cgi .php .php3 .php4 .php5 .phtml .pl .py .pyc .pyo + + AllowOverride None + + SetHandler none + SetHandler default-handler + + Options -ExecCGI + php_flag engine off + RemoveHandler .cgi .php .php3 .php4 .php5 .phtml .pl .py .pyc .pyo + + + + # Proxy Settings - `http_port` from the component config + RewriteEngine On + RewriteCond %{REQUEST_METHOD} !^GET$ + RewriteRule ^/(.*)$ http://127.0.0.1:8284/$1 [P,L] + + # Logging + ErrorLog ${APACHE_LOG_DIR}/error.log + CustomLog ${APACHE_LOG_DIR}/access.log combined + + # SSL + SSLEngine on + SSLProtocol ALL -SSLv2 -SSLv3 + SSLHonorCipherOrder On + SSLCipherSuite HIGH:!aNULL:!MD5 + SSLCertificateFile yourcert.pem + SSLCertificateKeyFile yourprivatekey.key + SSLCACertificateFile yourcacert.pem + SSLVerifyDepth 10 + + SSLOptions +StdEnvVars + + + SSLOptions +StdEnvVars + + + BrowserMatch "MSIE [2-6]" \ + nokeepalive ssl-unclean-shutdown \ + downgrade-1.0 force-response-1.0 + # MSIE 7 and newer should be able to use keepalive + BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown + + + \ No newline at end of file