Assets not served - Apache Reverse proxy - Diaspora
- by Matt
I have succeeded in installing Diaspora* on my subdomain diaspora.mattaydin.com. I have VPS running CentOS 5.7 with Plesk installed.
By means of an vhost.conf and vhost_ssl.conf file I, (with the help of another gentleman) have managed to reverse proxy the app.
vhost.conf:
ServerName diaspora.mattaydin.com
ServerAlias *.diaspora.mattaydin.com
<Directory /home/diaspora/diaspora/public>
Options -Includes -ExecCGI
</Directory>
DocumentRoot /home/diaspora/diaspora/public
RedirectPermanent / https://diaspora.mattaydin.com
vhost_ssl.conf
ServerName diaspora.mattaydin.com
DocumentRoot /home/diaspora/diaspora/public
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$ balancer://upstream%{REQUEST_URI} [P,QSA,L]
<Proxy balancer://upstream>
BalancerMember http://127.0.0.1:3000/
</Proxy>
ProxyRequests Off
ProxyVia On
ProxyPreserveHost On
RequestHeader set X_FORWARDED_PROTO https
<Proxy *>
Order allow,deny
Allow from all
</Proxy>
<Directory /home/diaspora/diaspora/public>
Options -Includes -ExecCGI
Allow from all
AllowOverride all
Options +Indexes
</Directory>
DocumentRoot /home/diaspora/diaspora/public
Basically it's working. However, the only thing that's not working are the assets. The do not get loaded not the server, as seen on diaspora.mattaydin.com
The error messages I get in the access_ssl.log are a lot of:
11/Dec/2012:19:04:05 +0100] "GET /robots.txt HTTP/1.1" 404 2811 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/536.26.17 (KHTML, like Gecko) Version/6.0.2 Safari/536.26.17"
The error messages I get from diaspora's log file is:
Started GET "//assets/branding/logo_large.png" for 77.250.99.193 at
2012-12-11 20:13:11 +0100
ActionController::RoutingError (No route matches [GET]
"/assets/branding/logo_large.png"): lib/rack/chrome_frame.rb:39:in
call' lib/unicorn_killer.rb:35:incall'
Hope you guys can help me out. If you need anything else please let me know
Thanks in advance,
Matt