Rails 4.2 Deploy NGINX, Puma, Capistrano, RBenv with SSL - 403 errors -


i getting 403 forbidden. have checked nginx/error.log , directory index of /home/deploy/apps/myapp/current/public/ forbidden have ssl , did check on https://www.digicert.com/help/ , see certificates set ok.

i wondering if be perhaps because don't have index.html file in public folder. running on rails 4.2. public folder has assets, 404.html, 422.html, 500.html, favicon.ico , robots.txt.

my question is, should doing set index.html in public folder lets me use /app/views/static_pages/home.html.erb (set root static_pages#home in routes file)?

i guess nginx isn't liking there not index.html find.

i went static pages controller , added:

def home  render :file => 'public/index.html'  end 

this nginx config file without ssl

upstream puma {   server unix:///home/laurie/apps/creativehub/shared/tmp/sockets/creativehub-puma.sock; }  server {   listen 80 default_server deferred;   server_name creativecalgary.ca www.creativecalgary.ca;      root /home/laurie/apps/creativehub/current/public;   access_log /home/laurie/apps/creativehub/current/log/nginx.access.log;   error_log /home/laurie/apps/creativehub/current/log/nginx.error.log info;    location ^~ /assets/ {     gzip_static on;     expires max;     add_header cache-control public;   }    try_files $uri/index.html $uri @puma;   location @puma {     proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for;     proxy_set_header host $http_host;     proxy_redirect off;      proxy_pass http://puma;   }    error_page 500 502 503 504 /500.html;   client_max_body_size 10m;   keepalive_timeout 10; } 

this first rails deploy. deploying on digital ocean droplet using ssh on cloud9 (with capistrano, puma, , nginx).


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -

jdbc - Not able to establish database connection in eclipse -