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

    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...
    3 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

    Magento 2.3.x Admin panel keeps loading (fresh installation)

    Hi, I have been trying to install Magento 2.3.5-p1 on Centos 7, Nginx with Php-fpm and maria db. I was able to install it after fixing several issues and Home Page is perfectly okay now. But my admin panel keeps on l...
    Accepted Answer: I have solved it, it was due to open_basedir, once i disabled it in php.ini and restarted php-fpm, and reinstalled magento, it worked fine.
    1 By afree Nginx CentOS MariaDB
  • 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

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

    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

    Wrong domain when sending mails from PHP, how to fix it?

    I had to rename my droplet to send mails, and it was renamed to my domain name, because I needed to be fqdn. When sending mails using php mail() function, it worked just fine, and the mails were received from somethin...
    Accepted Answer: Just had to update my /etc/mailname file
    2 By Dantael PHP Nginx DigitalOcean Debian 10
  • Question

    Best way to install wordpress and rails on same domain

    I have an nginx droplet with a rails app on it - I now need to add a wordpress site (as the landing pages to sit in front of my app. Im nervous about having wordpress and (my current app):'rails and elasticsearch and ...
    Accepted Answer: Hello, @christopherT If you think that the droplet can handle both applications without any issues you can go ahead and install WordPress on the same droplet. However if you would like to keep things separate you can...
    1 By christopherT WordPress Ruby on Rails Nginx
  • Question

    WordPress site compromised before completing installation

    I was just starting out with setting up my WordPress website (LEMP stack), and I left my site on the /wp-admin/install.php page for me to continue the next day. When I checked on it today, it was installed without me,...
    Accepted Answer: Hi there @NoodlesYum, If this was a fresh new Droplet, I would recommend deleting it and deploying a new one, as the person who finalized the installation for you might have uploaded a backdoor and it would be quicker...
    1 By NoodlesYum Security WordPress Nginx
  • Question

    Nginx gives 502 Bad Gateway when proxying to nodejs app running on different docker container

    I am using docker compose to create 2 containers one for application running on Nginx and another for backend application on Nodejs(running on another port 4000) with routes of patterns "/org-metadata/, /proxy-api/, /...
    Accepted Answer: Hello, I've tried testing your setup, what fixed the problem at my end was adjusting this part in the Nginx config: upstream backend { server 127.0.0.1:4000; } To: upstream backend { ser...
    2 By rgth Nginx Docker Node.js React
  • 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
  • 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

    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

    PhpMyAdmin got 404 not found error on nginx ubuntu 16.04

    Hello Digital Oceans, I'm using ubuntu 16.04 and configured LEMP with this tutorial (https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-in-ubuntu-16-04) on it. I tried to...
    Accepted Answer: @javadroid The symlink created in that guide points to /usr/share/nginx/www while your root directive points to another directory. Unless you specify another location block, NGINX doesn't technically know that the di...
    6 By javadroid Linux Commands Nginx Ubuntu 16.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