خرید بک لینک

i used the awesome Gist to setup unico together with nginx. It works perfect so far. But now i have the need to serve a small app with basically static files for a subdomain. I create a server block like this

server { 
       listen 80; 
       listen [::]:80; 
       server_name sub.domain; 
       access_log /var/log/nginx/sub.log main; 
       root /srv/dir; 
       index index.html; 

location / { 
      try_files $uri $uri/ =404; 
  } 
}

The root dir is owned by my regular user.

When i now access the URL my logs show me this output:

request: "GET / HTTP/1.1", host: "sub.domain"
2016/03/19 08:34:37 [crit] 30308#0: *7 stat() "PUBLIC_RAILS_APP_DIR"    failed (13: Permission denied), client: IP.IP.IP.IP, server: _, request:    "GET / HTTP/1.1", host: "sub.domain"
2016/03/19 08:34:37 [crit] 30308#0: *7 coect() to unix:/home/DIR_SHARED_SOCKET_UNICORN_SOCK failed (13: Permission denied) while coecting to upstream, client: IP.IP.IP.IP, server: _, request: "GET / HTTP/1.1", upstream: "http://unix:DIR_SHARED_SOCKET_UNICORN_SOCK", host: "sub.domain.com"
2016/03/19 08:34:37 [error] 30308#0: *7 open() "/home/tim/app/public/500.html" failed (13: Permission denied), client: IP.IP.IP.IP, server: _, request: "GET / HTTP/1.1", upstream: "http://unix:/home///shared/sockets/unico.sock/", host: "sub.domain.com"

What do i need to change in the nginx.conf to allow the server block? I am not familiar with NginX settings. Thanks in advance

برچسب: نویسنده: استخدام کار تاريخ: شنبه 29 اسفند 1394 ساعت: 14:17

صفحه بندی