-
-
Save dak180/1193928 to your computer and use it in GitHub Desktop.
Advanced Diaspora Apache reverse proxy
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
<IfModule adobe_crossdomainpolicy_module> | |
Listen 843 | |
<VirtualHost *:843> | |
AdobePolicyFileServerEnabled On | |
AdobePolicyFile /path/to/diaspora/public/crossdomain.xml | |
</VirtualHost> | |
</IfModule> | |
<VirtualHost *:80> | |
ServerName diaspora.example.org | |
RedirectPermanent / https://diaspora.example.org/ | |
</VirtualHost> | |
<VirtualHost *:443> | |
ServerName diaspora.example.org | |
DocumentRoot /path/to/diaspora/public | |
RewriteEngine On | |
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f | |
RewriteRule ^/(.*)$ balancer://thinservers%{REQUEST_URI} [P,QSA,L] | |
<Proxy balancer://thinservers> | |
BalancerMember http://127.0.0.1:3000 | |
</Proxy> | |
ProxyRequests Off | |
ProxyVia On | |
ProxyPreserveHost On | |
<Proxy *> | |
Order allow,deny | |
Allow from all | |
</Proxy> | |
SSLEngine On | |
SSLCertificateFile /path/to/cert | |
SSLCertificateKeyFile /path/to/private_key | |
# maybe not needed, need for example for startssl to point to a local | |
# copy of http://www.startssl.com/certs/sub.class1.server.ca.pem | |
SSLCertificateChainFile /path/to/chain_file | |
RequestHeader set X_FORWARDED_PROTO https | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment