So I am trying to follow the tutorial here: https://gorails.com/deploy/ubuntu/14.04 to deploy a Rails app. When I tried to edit the nginx.conf at (/etc/nginx/nginx.conf) file, it tells me I have read only permission, even though I followed the steps(with setting the permissions) previously. How do I fix this?
We can enable a server block's configuration file by creating a symbolic link from the sites-available directory to the sites-enabled directory, which Nginx will read during startup. To do this, enter the following command: sudo ln -s /etc/nginx/sites-available/ example.com /etc/nginx/sites-enabled/
Permissions ( chmod )Website user ( example ) can read, write all files, and read all directories. Website group (webserver user) can read all files and traverse all directories, but not write. All other users cannot read or write anything.
The 403 Forbidden error appears when your server denies you permission to access a page on your site. This is mainly caused by a faulty security plugin, a corrupt . htaccess file, or incorrect file permissions on your server.
you need sudo to edit that file, because it's owned by root user,
use sudo nano /etc/nginx/nginx.conf
or sudo vim /etc/nginx/nginx.conf
which ever editor you prefer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With