【发布时间】:2015-10-23 15:14:36
【问题描述】:
我正在生产模式下运行 Rails 4 应用程序...在 Windows 8.1... 由于某种原因,您在生产模式下损坏了图像和 css。由于 Windows 中没有Passenger gem,我必须使用 Apache 配置重定向或反向代理到 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 balancer://depot_cluster/
ProxyPassReverse /depot balancer://depot_cluster/
ProxyPreserveHost On
<Proxy balancer://depot_cluster>
BalancerMember http://127.0.0.1:3001/depot
</Proxy>
#ErrorLog "|C:/Webserver/Apache/bin/rotatelogs.exe logs/example.com/%Y.%m.%d.example.com.error.log 86400"
#CustomLog "|C:/Webserver/Apache/bin/rotatelogs.exe logs/example.com/%Y.%m.%d.example.com.access.log 86400"
combined
</VirtualHost>
然后运行我的应用程序:
thin -p 3000 -e production --prefix /depot start -p 3001
我已经预编译了我的资产,但也没有工作。
rake assets:precompile
为什么我在生产模式下运行我的应用程序?嗯...在真正的生产服务器中实现之前,我需要知道如何在 Windows 服务器中实现这个应用程序...
【问题讨论】:
标签: ruby-on-rails ruby apache thin