nginx ubuntu user password

0 votes

I have a nodejs backend hosted on AWS EC2 Ubuntu 20.04 instances.

When i ssh into my server, everything is working accordingly. Today i tried configuring nginx, so i created website.com files inside sites-available .

website.com

server {
        listen 80;
        listen [::]:80;

         root /home/ubuntu/apps/yelp-app/client/build;

        # Add index.php to the list if you are using PHP
        index index.html index.htm index.nginx-debian.html;

        server_name api.website.com www.api.website.com;

        location / {
                try_files $uri /index.html;
        }

         location /api {
            proxy_pass http://localhost:3001;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection 'upgrade';
            proxy_set_header Host $host;
            proxy_cache_bypass $http_upgrade;
        }

}

After saving that file, i ran the following command:

sudo ln -s /etc/nginx/sites-available/website.com /etc/nginx/sites-enabled/

From the docs, in order to enable the new site i need to restart nginx using the following:

systemctl restart nginx

Unfortunately, it keeps asking for the ubuntu user password which i did not ever set.

Can someone help me out?

Jan 11, 2023 in AWS by Tejashwini
• 3,820 points

edited 5 days ago 6 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP