My system is Arch linux. I try to install passenger-nginx by using the command “rvmsudo passenger-install-nginx-module”.
My application is in ” ~/rails_projects/myPedia ” directory. When i try to run server via “nginx” ; I get this error:
nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied)
2012/06/24 00:25:46 [emerg] 8853#0: open() "/var/log/nginx/access.log" failed (13: Permission denied)
What must be the correct permissions for those files or my user?
And in my /opt/nginx/conf/nginx.conf is :
http {
passenger_root /home/ytsejam/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.13;
passenger_ruby /home/ytsejam/.rvm/wrappers/ruby-1.9.3-p194/ruby;
................
server {
listen 80;
server_name localhost;
location /home/ytsejam/rails_projects/myPedia
passenger_enabled on
}
}
Is location set correctly for my application directory ?
Gives user running nginx write permission to “/var/log/nginx/error.log”.
And fix location path: