Question
Nginx with Lets encrypt loading "Welcome to Nginx" instead of my rails app
Hello, I have recently deployed my Ruby on Rails application to a plain Ubuntu 16.04 droplet with Nginx, passenger & Let’s encrypt.
The rails app worked fine without Let’s encrypt but as soon as I installed it, I can’t seem to understand why it’s pointing to the “Welcome to Nginx” page instead of my rails app.
In /etc/nginx/sites-enabled/default
I’ve used:
root /var/www/myapp;
root /var/www/myapp/code;
root /var/www/myapp/code/public;
This is where my application is.
Under /etc/nginx/nginx.conf
I’ve tried using these:
user www-data;
user rails;
user root;
And I’ve even changed the ownership around a few times for root, rails and www-data:
sudo chown -R www-data:www-data /var/www/myapp
sudo find /var/www/myapp -type d -exec chmod 770 {} \;
sudo find /var/www/myapp -type f -exec chmod 660 {} \;
I don’t know what gives… I keep getting “403 Forbidden nginx/1.14.0” but it worked fine and launched my deployed app without Let’s Encrypt.
I would love some help, thank you!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×