你好,我的应用程序工作正常,直到Linode在服务器上做了某种硬件更新。 服务器上的所有文件仍然存在,一切似乎都和以前一样。 我联系了Linode,他们提到这可能是一个许可问题(我找不到),他们不能有更多的帮助。
2015/06/21 18:07:23 [error] 2870#0: *19684 directory index of "/home/aurelplouf/apps/myapp/current/public/" is forbidden,client: XXX.XXX.XXX.XXX,server: XXX.XXX.XX.XX,request: "GET / HTTP/1.1",host: "myapp.com"
我有点不知所措,因为我没有任何变化。
我检查了passenger-config --root
Nginx – url重写正则expression式
升级到Ubuntu 14.10后,PHP / Nginx设置问题
Node.JS,HAproxy和Socket.IO通过Nginx,应用程序位于子目录中
Elasticsearch 2.4节点不会与ConnectTransportException形成集群
HTTP2与Nginx代理之后的node.js
/home/aurelplouf/.rvm/gems/ruby-2.1.2@rails3.2/gems/passenger-4.0.53
哪个ruby
/home/aurelplouf/.rvm/rubies/ruby-2.1.2/bin/ruby
和以下设置的Nginx.conf :
http { passenger_root /home/aurelplouf/.rvm/gems/ruby-2.1.2@rails3.2/gems/passenger-5.0.11; passenger_ruby /home/aurelplouf/.rvm/gems/ruby-2.1.2@rails3.2/wrappers/ruby; include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; server { listen 80; server_name xxx.xxx.xx.xx myapp.com www.myapp.com *.myapp.com root /home/aurelplouf/apps/myapp/current/public; passenger_enabled on; location / { #root html; # root /home/aurelplouf/apps/myapp/current/public; # index index.html index.htm; passenger_enabled on; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } }
aurelplouf@ruby:~/apps/myapp/current$ ls -al public total 32 drwxrwxr-x 2 aurelplouf aurelplouf 4096 Jun 21 17:15 . drwxrwxr-x 15 aurelplouf aurelplouf 4096 Jun 21 17:15 .. -rw-rw-r-- 1 aurelplouf aurelplouf 728 Feb 15 2014 404.html -rw-rw-r-- 1 aurelplouf aurelplouf 711 Feb 15 2014 422.html -rw-rw-r-- 1 aurelplouf aurelplouf 643 Feb 15 2014 500.html lrwxrwxrwx 1 aurelplouf aurelplouf 51 Jun 21 17:13 assets -> /home/aurelplouf/apps/myapp/shared/assets -rw-rw-r-- 1 aurelplouf aurelplouf 1150 Feb 15 2014 favicon.ico -rw-rw-r-- 1 aurelplouf aurelplouf 431 Oct 21 2014 robots.txt -rw-rw-r-- 1 aurelplouf aurelplouf 340 Oct 21 2014 sitemap.xml.gz lrwxrwxrwx 1 aurelplouf aurelplouf 51 Jun 21 17:15 system -> /home/aurelplouf/apps/myapp/shared/system lrwxrwxrwx 1 aurelplouf aurelplouf 52 Jun 21 17:15 uploads -> /home/aurelplouf/apps/myapp/shared/uploads
Nginx / Djangofile upload权限
“找不到python应用程序”uWsgi + Nginx + Ubuntu 13
Nginx:access.log和error.log文件为空
Django不断地将URL从http:// localhost /更改为http://127.0.0.1:8080/
passenger_enabled指令只能在配置文件中出现一次。 保持在服务器级别,并删除你的location /块。
此外,您可能需要考虑在server部分添加资产块,以允许在浏览器中进行静态资产缓存( 只要您使用的是rails资产管道 ,则应该如此):
http { passenger_root /home/aurelplouf/.rvm/gems/ruby-2.1.2@rails3.2/gems/passenger-5.0.11; passenger_ruby /home/aurelplouf/.rvm/gems/ruby-2.1.2@rails3.2/wrappers/ruby; include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; server { listen 80; server_name xxx.xxx.xx.xx myapp.com www.myapp.com *.myapp.com; root /home/aurelplouf/apps/myapp/current/public; passenger_enabled on; location ~ ^/(assets)/ { root /home/aurelplouf/apps/myapp/current/public; gzip_static on; expires max; add_header Cache-Control public; gzip_vary on; etag off; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } }
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。