Ruby on rails LINODE上带有RAILS的NGINX配置
这是我的nginx.conf文件Ruby on rails LINODE上带有RAILS的NGINX配置,ruby-on-rails,ruby,nginx,capistrano,unicorn,Ruby On Rails,Ruby,Nginx,Capistrano,Unicorn,这是我的nginx.conf文件 upstream unicorn { server unix:/tmp/unicorn.blog.sock fail_timeout=0; } server { listen 80 default deferred; # server_name example.com; root /home/deployer/apps/blog/current/public; location ^~ /assets/ { gzip_static on
upstream unicorn {
server unix:/tmp/unicorn.blog.sock fail_timeout=0;
}
server {
listen 80 default deferred;
# server_name example.com;
root /home/deployer/apps/blog/current/public;
location ^~ /assets/ {
gzip_static on;
expires max;
add_header Cache-Control public;
}
try_files $uri/index.html $uri @unicorn;
location @unicorn {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://unicorn;
}
error_page 500 502 503 504 /500.html;
client_max_body_size 4G;
keepalive_timeout 10;
}
我尝试添加SSL-我重新安装并重新启动了NGINX和服务器。我把所有重新部署的东西都拆了,然后它又重新启动了。。。。现在我也试了同样的方法。尝试添加SSL失败。解开。现在服务器已关闭。是github的修订版 Ran/etc/init.d/unicorn\u博客启动并重新启动unicorn。它起作用了