I'm running a Rails 4 application in production mode...in Windows 8.1... For some reason y have broken images and css in production mode. Since there is no Passenger gem in Windows, I have to use Apache config to redirect or reverse proxy to Thin:
<VirtualHost *:8888>
ServerAdmin webmaster@example.com
ServerName Depot
#ServerAlias
DocumentRoot "c:/my_directory_tree/depot"
<Directory "C:/my_directory_tree/depot">
Require all granted
Options -MultiViews
</Directory>
ProxyPass /depot http://balancerdepot_cluster/
ProxyPassReverse /depot http://balancerdepot_cluster/
ProxyPreserveHost On
<Proxy http://balancerdepot_cluster>
BalancerMember http://ift.tt/1OTx1pQ
</Proxy>
#ErrorLog "|C:/Webserver/Apache/bin/rotatelogs.exe logs/http://ift.tt/1JBdB8Z 86400"
#CustomLog "|C:/Webserver/Apache/bin/rotatelogs.exe logs/http://ift.tt/1OTx1pS 86400"
combined
</VirtualHost>
And run my application with:
thin -p 3000 -e production --prefix /depot start -p 3001
I already precompiled my assets, but didn't work either.
rake assets:precompile
Why I'm running in production mode my app? Well... before implementing in a real production server, I need to know how to implement this application in Windows server...
Aucun commentaire:
Enregistrer un commentaire