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.
2412 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...
    8 By hbendixlewis Nginx API Let's Encrypt DigitalOcean Ubuntu 18.04
  • Question

    How can i fix NGINX Wordpress not sending emails?

    Hello, i just installed wordpress on VPS following your tutorials and now i don't know how to configure it to be able to send emails from wordpress. I tested it with Check Email plugin and nothing. Do i need a separat...
    Accepted Answer: Hi @hcmendez, WordPress cannot send emails by itself. It has to rely on an email server to do the job. You can set up an SMTP email server or use a third-party service. Generally, you will install a WordPress plugin a...
    1 By hcmendez WordPress Email Nginx
  • 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

    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?
    2 By cvanorman Nginx Ubuntu 18.04 Networking
  • 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

    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

    Next.JS Deployment to Nginx Droplet

    I'm currently attempting to deploy my Next.js SSG application to the same droplet that my backend graphql api is hosted on. The api sits at /graphql while the app sits at /app but when I navigate to /app I get a loadi...
    Accepted Answer: Solved the problem it turns out that I hadn't properly set up the express server to operate on the correct root it was / and it should've been replaced with /api
    2 By milorue Nginx React GraphQL
  • Question

    media files returns 404 not found

    my nginx file looks like: ``` location = /favicon.ico { accesslog off; lognot_found off; } location /static/ { alias /home/me/projectdir/static/; } location /media/ { alias /home/me/projectdir/media/; } locati...
    Accepted Answer: Hi there @elprincipe, Do you see any errors in your Nginx error log? You can check that with the following command: command,bash sudo tail -100 /var/log/nginx/error.log It is quite possible that Nginx does not have t...
    1 By elprincipe Nginx Python PostgreSQL Django Python Frameworks Ubuntu 18.04 Databases
  • 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

    Disable old TLS versions (1.0/1.1 ) for Apache/Nginx on Ubuntu 18.04 or CentOS 7

    I recently got asked how we can disable old TLS versions on a server. The user was applying for a PCI compliance and wanted to have only TLS 1.2 running on their machine in order to pass the scan of the PCI vendor.
    Accepted Answer: Here is a little step by step guide on how to set this on a CentOS server. <^>Before you start, please keep in mind that you can always run into some issues and it's really important to make a working copy of your con...
    2 By alexdo Ubuntu 18.04 CentOS Apache Nginx
  • Question

    Prevention of Host Header Attacks with Nginx

    I followed a tutorial on configuring Nginx to prevent host header attacks on Meduim (https://medium.com/@alex_kuznetsov/how-to-fix-django-error-invalid-http-host-with-nginx-d0183a1ca753). I placed the statement in the...
    Accepted Answer: Nevermind, figured it out after playing around with it and it seems work placed in the sites-enabled/mydomain file in the server section.
    1 By mspe Nginx
  • 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 create _dmarc.mydomain.com subdomain

    Hello. I am attempting to set-up a subdomain on the domain droplet with the NGINX server on Ubuntu 20.04 to implement a DMARC record for my outgoing Gmail through a WordPress SMTP plugin with preconfigured SPF & DKIM ...
    Accepted Answer: Hi, It looks like you try to create new subdomain <^>_dmarc<^> for your domain. So, the message you get is 100% OK, domain name cannot contain underscore sign. If you want to create DMARC record, you need to add TXT r...
    2 By MALbISH Email Nginx Ubuntu 20.04 DigitalOcean
  • Question

    No valid IP address found for domain when trying to get SSL certificate?

    As I was following the tutorial found here: https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-20-04 (http://) in order to get my SSL certificate. On step 4 I am asked to...
    Accepted Answer: Hi, Is it really domain <^>m.ca<^> ? I tried few whois lookup web sites and got the same result - domain has not got an owner. In such case, there is no chance to get a certificate for it. But, if you put <^>m.ca<^> j...
    1 By ahsam Nginx Ubuntu Security 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

    "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

    .htaccess config to Nginx?

    I am trying to change those Apache rewrite rules to Nginx, but auto converter fails. And I am not very good at them. Can anyone help please? RewriteEngine On  RewriteBase /  RewriteCond %{HTTP:X-HTTPS} !1  RewriteCond...
    Accepted Answer: @mianofv Wow, that's a difficult config to read - specially if you're new to Nginx, so I understand why you can't figure it out. Instead of trying to hack around with http vs https, maybe we should simply look at exc...
    5 By mianofv Apache Nginx CentOS