Note that there are some explanatory texts on larger screens.

plurals
  1. PO"Access Forbidden" - Passenger, Nginx, Rails
    text
    copied!<p>I know there are about 100 questions about this, but after hours of research, I couldn't find my solution. Here's my nginx config:</p> <pre><code>server { listen 80 default_server; listen [::]:80 default_server ipv6only=on; root /home/LucyRb/public; passenger_enabled on; passenger_app_env production; index index.html index.htm; server_name &lt;domain name&gt;; location / { try_files $uri $uri/ /index.html; passenger_enabled on; } } </code></pre> <p>My <code>/public</code> directiory:</p> <pre><code>root@Lucy:/var/www/LucyRb/public# namei -l * f: 404.html -rwxrwxrwx root root 404.html f: 422.html -rwxrwxrwx root root 422.html f: 500.html -rwxrwxrwx root root 500.html f: favicon.ico -rwxrwxrwx root root favicon.ico f: robots.txt -rwxrwxrwx root root robots.txt </code></pre> <p>I don't think it's a permission problem. I've already run <code>rake db:migrate</code> to create the database, and it worked. I'm pretty sure environments are set up properly. All I get is a file listing (since autoindex is on, otherwise I get a 403). But routes, nor does the app default index/root, work. I've read the Passenger documentation, and I tried troubleshooting with the docs and other SO questions, but I can't seem to get this working. </p> <p>I haven't forgotten to <code>bundle install</code> and all the proper packages are installed, I'm pretty sure (did I forget any? <code>mysql</code>, <code>rvm</code> and its relevant steps for installing rails, <code>nginx</code>, <code>passenger</code>... Probably another 2-3).</p> <p>I know I'm not supposed to start <code>rails server</code> because it will only allow 1 connection at a time. So nginx is supposed to do that properly, right? Or is that what I'm supposed to do with certain flags?</p> <p>Thanks in advance.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload