![](/img/trans.png)
[英]Phusion Passenger + Nginx Virtual Host Configuration for Ruby on Rails Application in Debian 6
[英]phusion passenger nginx module not picking up my rails application
注意:乘客獨立運行於我的rails應用程序上很好,因為我需要部署多個rails應用程序,所以我需要passenger-install-nginx-module
操作系統 ubuntu 12.04 LTS 64位
Ruby REE 1.8.7(通過Brightbox存儲庫安裝)
Rails 2.3.17
通過passenger-install-nginx-module安裝的 Nginx
乘客 3.0.19
Nginx 1.2.6
我的nginx.conf
/opt/nginx/conf/nginx.conf
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
passenger_root /usr/lib/ruby/gems/1.8/gems/passenger-3.0.19;
passenger_ruby /usr/bin/ruby1.8;
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 80;
server_name localhost;
root /home/sampath/railsdemoapp/public;
passenger_enabled on;
}
}
當我通過sudo / opt / nginx / sbin / nginx啟動nginx時,訪問URL時顯示403 Forbidden nginx / 1.2.6
這是因為Nginx以www-data或其他www用戶身份運行。 必須允許他訪問“ / home / sampath / railsdemoapp / public”。 您需要修正權限。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.