How to change sites-available configurations in NGinx

by Rama   Last Updated August 01, 2020 13:00 PM

I am new to Linux. I want to deploy my asp.net core application on Ubuntu 16.04 LTS virtual machine. I installed asp.net core on Ubuntu and managed to run a simple asp.net core web application on Ubuntu. In addition, I want to setup Nginx web server as the reverse proxy for my application. I followed this article in order to install Nginx. Eventhough Nginx server successfully installed I cannot change following configurations on default file of Nginx Sites-Available section as above article explained since the whole directory is read only.

server {
    listen 80;
    location / {
        proxy_pass http://localhost:5000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection keep-alive;
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
}

enter image description here

What have I done wrong and please tell me how to edit this file.



Answers 1


The directory is owned by root, so you need to login as root or use su or sudo to get root rights in order to modify its contents.

Tero Kilkanen
Tero Kilkanen
November 01, 2016 01:54 AM

Related Questions



Ubuntu server allow user to reload nginx service

Updated April 21, 2016 08:00 AM


PHP $_GET function is not working on server

Updated September 12, 2016 08:07 AM