I'm trying to run Diaspora and Mastodon on my server (crazy idea, right?) and Apache's ProxyPass won't work to localhost ports 3000 (Diaspora) and 4000 (Mastodon). I get a 403 for both https://diaspora.thechatpit.com and https://mastodon.thechatpit.com -- both have different users, but I've got both users in the same group for the user Apache uses, and the permissions have been expanded to give the same permissions to the file and directory for the group as per the user permissions. About the only thing I can think of from here is to chmod everything 777, but that's never the right thing to do.
I'm going to include the redacted config files for each, starting with Diaspora:
# Diaspora config file for Apache
<VirtualHost *:80>
ServerName diaspora.thechatpit.com
RedirectPermanent / https://diaspora.thechatpit.com/
</VirtualHost>
<VirtualHost *:443>
ServerName diaspora.thechatpit.com
DocumentRoot "/usr/share/webapps/diaspora/public"
SSLEngine on
SSLCertificateFile <cert>
SSLCertificateKeyFile <key>
RewriteEngine on
RewriteCond %{HTTP_HOST} !^diaspora\.thechatpit\.com [NC]
RewriteRule ^/(.*)$ https://diaspora\.thechatpit\.com/$1 [L,R,QSA]
# For Camo support
RewriteRule ^/camo/(.*)$ balancer://camo/$1 [P,QSA,L]
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$ balancer://upstream%{REQUEST_URI} [P,QSA,L]
<Proxy balancer://upstream>
BalancerMember http://localhost:3000
BalancerMember http://localhost:8081
</Proxy>
ProxyRequests on
ProxyVia on
ProxyPreserveHost on
RequestHeader set X_FORWARDED_PROTO https
<Proxy *>
Require all granted
</Proxy>
<Directory "/usr/share/webapps/diaspora/public">
Options -MultiViews
Require all granted
</Directory>
<Location "/usr/share/webapps/diaspora/public">
ProxyPass "https://localhost:3000"
ProxyPassReverse "https://localhost:3000"
</Location>
</VirtualHost>
...and the one for Mastodon:
# Mastodon for Apache config file
<VirtualHost *:80>
ServerName mastodon.thechatpit.com
RedirectPermanent / https://mastodon.thechatpit.com/
</VirtualHost>
<VirtualHost *:443>
ServerName mastodon.thechatpit.com
DocumentRoot /var/lib/mastodon/public
SSLEngine on
SSLCertificateFile <cert>
SSLCertificateKeyFile <key>
RewriteEngine On
RewriteCond %{HTTP_HOST} !^mastodon\.thechatpit\.com [NC]
RewriteRule ^/(.*)$ https://mastodon\.thechatpit\.com/$1 [L,R,QSA]
ProxyRequests on
ProxyVia on
ProxyPreserveHost on
RequestHeader set X_FORWARDED_PROTO https
<Proxy balancer://upstream>
BalancerMember https://localhost:4000
</Proxy>
<Proxy *>
Require all granted
</Proxy>
<Directory /var/lib/mastodon/public>
Options -MultiViews
Require all granted
</Directory>
<Location /var/lib/mastodon/public>
ProxyPass "https://localhost:4000"
ProxyPassReverse "https://localhost:4000"
</Location>
</VirtualHost>
It might be something simple with the proxies, but I've been banging my head against this all day and am ready for some help