0
我有rails應用程序與有用的nginx和乘客運行,並且我想添加靜態頁面(調用代碼覆蓋率分析工具 - simplecov)。 Localy這工作正常(沒有乘客),但在服務器上這不起作用。 我的nginx.conf:nginx與乘客不處理靜態資產
#user nobody;
worker_processes 1;
events {
worker_connections 1024;
#speed up for linux 2.6+
use epoll;
}
http {
passenger_root /home/demo/.rvm/gems/[email protected]/gems/passenger-3.0.9;
passenger_ruby /home/demo/.rvm/wrappers/[email protected]/ruby;
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name *.dev.mysite.com;
root /var/www/projects/mysite/qa/current/public;
passenger_enabled on;
rails_env qa;
charset utf-8;
error_log /var/www/projects/mysite/qa/shared/log/host.error.log;
}
#Coverage code tool (SimpleCov gem)
server {
listen 4444;
server_name coverage.mysite.com;
location/{
root /var/lib/jenkins/jobs/WebForms/workspace/coverage;
index index.html index.htm;
}
}
#Yard server
server {
listen 5555;
server_name yard.mysite.com;
location/{
proxy_pass http://127.0.0.1:8808;
}}}
而且沒有收到,當我嘗試打至coverage.mysite.com:4444。