diff options
Diffstat (limited to 'files/apache/source.devboardsforandroid.linaro.org.conf')
-rw-r--r-- | files/apache/source.devboardsforandroid.linaro.org.conf | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/files/apache/source.devboardsforandroid.linaro.org.conf b/files/apache/source.devboardsforandroid.linaro.org.conf new file mode 100644 index 00000000..53335e15 --- /dev/null +++ b/files/apache/source.devboardsforandroid.linaro.org.conf @@ -0,0 +1,69 @@ +<VirtualHost *:80> + ServerName source.devboardsforandroid.linaro.org + + RedirectMatch permanent "^/(?!\.well-known/acme-challenge)(.*)" "https://source.devboardsforandroid.linaro.org/$1" + + RewriteEngine On + Include /etc/apache2/linaro/block-refs.conf + + + Include /etc/apache2/linaro/letsencrypt.conf +</VirtualHost> + +<VirtualHost *:443> + ServerName source.devboardsforandroid.linaro.org + + Include /etc/apache2/linaro/settings-ssl.conf + SSLCertificateFile /etc/dehydrated/certs/source.devboardsforandroid.linaro.org/fullchain.pem + SSLCertificateKeyFile /etc/dehydrated/certs/source.devboardsforandroid.linaro.org/privkey.pem + SSLCACertificateFile /etc/dehydrated/certs/source.devboardsforandroid.linaro.org/fullchain.pem + DocumentRoot /srv/gerrit + + CustomLog /var/log/apache2/source.devboardsforandroid.linaro.org-access.log combined + ErrorLog /var/log/apache2/source.devboardsforandroid.linaro.org-error.log + + ExpiresActive On + ExpiresDefault "access plus 0 seconds" + + ExpiresByType text/css "access plus 1 week" + ExpiresByType text/javascript "access plus 1 week" + ExpiresByType image/png "access plus 1 month" + ExpiresByType image/jpg "access plus 1 month" + ExpiresByType image/jpeg "access plus 1 month" + ExpiresByType image/x-icon "access plus 1 month" + + Header append Cache-Control "no-transform" + + <FilesMatch "\.(html|htm)$"> + Header add Cache-Control "must-revalidate" + </FilesMatch> + + <FilesMatch "\.(js|css)$"> + Header add Cache-Control "max-age=604800" + <ifModule mod_deflate.c> + SetOutputFilter DEFLATE + </ifModule> + </FilesMatch> + + RequestHeader set X-Forwarded-Scheme http + + ProxyRequests Off + ProxyVia Off + ProxyPreserveHost On + <Proxy *> + Order deny,allow + Allow from all + </Proxy> + + AllowEncodedSlashes On + + # Just like AOSP, keep URL navigation simple by using / instead of /plugins/gitiles + ProxyPassMatch .*git-upload-pack.* http://127.0.0.1:8080/ retry=0 nocanon Keepalive=On + ProxyPassMatch .*/info/refs.* http://127.0.0.1:8080/ retry=0 nocanon Keepalive=On + + ProxyPass / http://127.0.0.1:8080/plugins/gitiles/ retry=0 nocanon Keepalive=On + + RewriteEngine On + Include /etc/apache2/linaro/block-refs.conf + RewriteRule ^/plugins/gitiles(.+)$ https://source.devboardsforandroid.linaro.org$1 [L,R=301,NE] +</VirtualHost> |