Nginx

Nginx is one of the most popular web servers in the world and is responsible for hosting some of the largest and highest-traffic sites on the internet.

Nginx subscription active
You will receive email notifications for new publications on Nginx.
2847 Results
  • Question

    Ubuntu 16.04 - Creating New User and Adding SSH Keys

    I am following the tutorial to add an SSL certificate to the Ubuntu 16.04 (https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04) droplet, but in the instructions it i...
    Accepted Answer: @connordphillips The root user is a super user and the only real super user on the OS by default. You can add sudo users which have permission to escalate to root after authenticating, though root is still a super us...
    5 By connordphillips Linux Basics Linux Commands Nginx Ubuntu 16.04
  • Question

    connect() failed (111: Connection refused) while connecting to upstream

    Hi all, Followed this (https://lengstorf.com/code/deploy-nodejs-ssl-digitalocean/) tutorial to get Let's Encrypt working on my Nest.js/Node server. Everything works - running sudo nginx -t returns: nginx: the configu...
    Accepted Answer: Hello, You can only have 1 service listening on 1 port. So as you have Nginx listening on port 80 at the moment, you can not have your Node on the same port. Also as you currently have your Nginx set to work as a reve...
    11 By hbendixlewis Nginx API Let's Encrypt DigitalOcean Ubuntu 18.04
  • Question

    How do I forward client IP instead of proxy IP in Nginx Reverse Proxy?

    Overview I have a setup that looks like this: * Nginx Reverse Proxy with a Floating IP * Reverse Proxy is configured to forward requests from users to a 3rd party SaaS application, BigCommerce which then handles the r...
    Accepted Answer: Hi @cvanorman I think that what you have in place is correct in terms of the 4 headers that you've configured already. What is the output of the Nginx access logs? Are you seeing the correct IP there?
    3 By cvanorman Nginx Ubuntu 18.04 Networking
  • Question

    How to run node.js server with Nginx

    Hi all, I'm trying to figure out how to get my Node server.js to run on my droplet with Let's Encrypt / nginx It was working by just ssh-ing into the droplet, cd into the project folder (cloned from Github repo) and r...
    Accepted Answer: Hmmm all that sounds like it should work... Just to be clear, this is what your nginx config should look like: ``` server { listen 80; servername mydomain.com www.mydomain.com; return 301 https...
    1 By keithj0nes Nginx DigitalOcean Node.js Ubuntu 16.04
  • Question

    How to upgrade PHP 7.0.33 to 7.4.7 on Ubuntu 16.04 (NGINX)?

    My server configuration (DigitalOcen): * 4GB RAM | 80 GB Disk * Ubuntu 16.04 x64 (NGINX) - WordPress Current PHP version: 7.0.33 * Reason to upgrade: WordPress Error - PHP Update Required Kindly help. Thank you!
    Accepted Answer: Hi @chinmayrajyaguru, You can actually upgrade the PHP version, you can just install a new one. Firstly, to be able to install a certain PHP version, in this case, 7.2 you'll need to add a certain repository to your ...
    2 By chinmayrajyaguru Ubuntu 16.04 Nginx PHP WordPress
  • Question

    Load Balancer says droplet down but it is up

    Hi team , Please help to either debug or resolve this issue. I am facing this issue with every droplet & loadbalancer
    Accepted Answer: Hi there, What I could suggest is changing the health check from HTTP to TCP. DigitalOcean Loadbalancer TCP config https://imgur.com/P6c6MD1.png Also, make sure that the check port matches the one that your backend se...
    1 By websiteocean58 Nginx Load Balancing
  • Question

    502 Bad Gateway : connect() failed (111: Unknown error) while connecting to upstream

    Hi I have a MERN stack app and it always worked like charm until this morning when we suddenly got a 502 Bad Gateway(without touching anything). I’ve seen another Post on here which is resolved but any of the steps i...
    Accepted Answer: Hello, The error indicates that your Node service is not running so the Nginx service is unable to connect. What you need to do is to start your Node service. This would depend on your personal setup, but for example ...
    1 By axiom88guru Nginx DigitalOcean Ubuntu 20.04
  • Question

    Nginx not starting: Address already in use (nginx: bind to 0.0.0.0:80 failed)

    Hi all, I just installed Nginx but when I try to start it it fails with the following error: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) If I check the status I get the following output: ``...
    Accepted Answer: Hi there @bitmap, It would usually mean that you have another service running on the same port. And note that you can not have multiple services listening on the same port. The service which is already listening on po...
    1 By bitmap Nginx Linux Basics Linux Commands Ubuntu
  • Question

    Nginx 111: Connection refused errors.

    Hello, I'm running Nginx /unicorn I'm getting errors "failed (111: Connection refused) while connecting to upstream" from nginx. It seems I've tried just about everything DO support, google and stackoverflow has to of...
    Accepted Answer: Thanks Everyone. it turns out this was a rails/permission problem. I looked just about everywhere except in the unicorn access logs and thats where i discovered the problem. I think ultimately when the server was boun...
    4 By anthonyhill Nginx DigitalOcean
  • Question

    404 Not Found nginx/1.10.0 (Ubuntu)

    Hi guys, I install wordpress on Lemp on 16.04 ( this was installed using the via DO droplet) following this tutorial https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-lemp-on-ubuntu-16-...
    Accepted Answer: Make sure you have your WordPress site stored in /var/www/html and set correct permissions on /var/www/html and it's content. To check, the following simple ls command will do the job: command ls -ld /var/www/html Al...
    7 By mishfaq WordPress Nginx Ubuntu 16.04
  • Question

    upstream timed out (110: Connection timed out) while reading response header from upstream

    Since a while I'm experiencing 501 timeouts on my DO hosted WP website. I checked /var/log/nginx/error.log and I've gotten about two errors per minute (they stopped all of the sudden and my website is online again sin...
    Accepted Answer: Hi there @angieCoral, It looks like that your PHP FPM service is crashing, this is why you are seeing these errors in your Nginx error log. I could suggest checking your PHP FPM error log for more information on why t...
    1 By angieCoral Nginx LEMP
  • Question

    Conflicting server name "mydomain.com" on 0.0.0.0:80, ignored NGINX error log Ubuntu 20.04

    Hello, when I check the nginx error log I notice that alert and I don't know why, I cannot access my website from http or https, my DNS in cloudflare are: A - mydomain.com - MY IP CNAME - www - mydomain.com The 4 l...
    Accepted Answer: Hi there @hcmendez, It most likely means that you have your mydomain.com domain specified in multiple Nginx server blocks. What you could do is use the grep command and search for the mydomain.com domain inside your /...
    2 By hcmendez Nginx
  • Question

    Why is reverse proxy is not working with nginx?

    I have spun up a Fedora box, and am running a golang server at port 8080. I am trying to setup nginx reverse proxy on that application so that I can access it through port 80. If you want to skip reading the whole que...
    Accepted Answer: bash setsebool httpd_can_network_connect on -P Please follow more information https://stackoverflow.com/a/24830777/9848490
    1 By sntshkmr60 Nginx Go Deployment Fedora CentOS
  • Question

    Docker compose - (nginx, node.js, react)

    Hi, I have some troubles with my application I am using docker-compose and I have 2 backend node.js apps and 1 react fe. Part of docker-compose is nginx. After start everything works fine, but in a while (sometimes ho...
    Accepted Answer: Hi there, As the services are working for some time before you get the error, this makes me think that the problem is not related to your docker-compose YAML. Most likely one of the services is crashing due to an erro...
    1 By petrMantaRay Docker Nginx Node.js
  • Question

    Error while setting up ssl, "/usr/share/nginx/html/favicon.ico" failed (2: No such file or directory)

    Hi all, While setting up my ssl using lets encrypt, I keep getting the following error: 2021/09/10 18:32:08 [error] 18402#18402: *1546 open() "/usr/share/nginx/html/favicon.ico" failed (2: No such file or directory)...
    Accepted Answer: Hi there, As far as I can see, your Nginx proxy rules are currently present only under the Nginx server block that serves port 80/http. You need to also carry over those rules to the Nginx server block for the port 44...
    1 By madhavm2002 Nginx CentOS
  • Question

    Nginx 404 error with existing urls Angular 2 One page application with routing

    I have a one-page angular 2 application that uses routing. When I hit my base URL example.com then the page loads correctly. However example.com/dashboard results in a 404 error. My server logs have this: 2017/02/14 ...
    Accepted Answer: @marcduplessis1 Instead of using: try_files $uri $uri/ =404; ... try using: try_files $uri $uri/ /index.html; This assumes that Angular is setup to handle requests that are sent to index.html and will route all r...
    4 By marcduplessis1 Nginx Ubuntu 16.04
  • Question

    How to Troubleshoot Common Nginx Issues on Linux Server?

    I have been seeing this question quite a lot recently, so I decided to put together a few steps on what to do in case your website is not loading. If you are using Apache you could follow these steps here instead: htt...
    Accepted Answer: I would recommend following these steps in case that you are having any problems with your nginx server and you are unsure on what the problem is: Check if nginx is running: systemctl status nginx If nginx is runnin...
    1 By bobbyiliev Nginx Linux Basics Linux Commands
  • Question

    Reverse Proxy from Droplet to App Platform

    Hello, In my project I have a constraint where I have to whitelist some IP for a reverse proxy to a specific url /system However I wanted to have the root path be on the App Platform so I can make use of Zero Downtime...
    Accepted Answer: 👋 @thecertnginx Seems reasonable to me. Dedicated egress IPs are something that we have on the roadmap though it's a ton of work and will take some time. As for downsides, I guess there may be a tiny bit of added lat...
    1 By thecertnginx Nginx DigitalOcean Droplets
  • Question

    "sudo apt-get update" command is not working

    Hello! <^>Error log<^> ``` Last login: Fri Jul 1 00:56:49 2016 from XXX.XXX.XXX.XX root@xxx:~# sudo apt-get update Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [94.5 kB] Hit:2 http://nyc2.mirrors...
    Accepted Answer: @chinmayrajyaguru There's a few things we can do in an effort to resolve this. First, I'd clean up the lists for apt-* by running: sudo rm -rvf /var/lib/apt/lists/* The above command removes all files and directori...
    3 By chinmayrajyaguru Nginx LEMP WordPress DigitalOcean Ubuntu 16.04
  • Question

    Nginx Failed... Failed to start A high performance web server and a reverse proxy server.

    I rebooted the computer, and this happened. Why did this happen? Please help me. sudo systemctl status nginx ● nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd...
    Accepted Answer: Hi @khs32101, Looking at the error log provided, it seems like there are typos in your Nginx config files. The following two lines are the most important ones: ```bash 07 23 10:55:41 gblsvips-sv nginx[167493]: nginx:...
    1 By khs32101 Nginx Ubuntu 20.04