Ask a development question or answer others’ in our diverse Q&A section.
For information about the DigitalOcean product, check out our Product Docs.

3810 Questions
Ask a question
  • Question

    "Nginx welcome to nginx" displays www. prefix; works fine without.

    I set up Lets encrypt using Certbot, everything works fine when I view my website via “”, however when I use “” I get a welcome to nginx landing page. I’ve attempted to fix this by following ...
    Accepted Answer: Hi there @mrvd, Your Nginx configuration looks all correct. What I could suggest is checking if your www version has a CNAME DNS record pointing to your main domain. You can use this DNS tool to check that here: https...
    2 By mrvd Nginx Linux Commands
  • Question

    Node API served with NGINX cannot serve images

    I have built an Ubuntu server and I have installed Node, Mongo, and NGINX. I have a Node API server that interacts with MongoDB. I also have an Agular app that interacts with the API and successfully stores data in Mo...
    2 By andrchas Nginx
  • Question

    nginx server shows 403 error: directory index of > “/home/deploy/my_app/current/public/” is forbidden

    Everything was working fine earlier. I got message on Digital Ocean server and so upgraded a few packages on droplet (Ubuntu 18.04 LTS). Since then the site is broken and I get 403 error. I have restarted nginx severa...
    Accepted Answer: The problem is resolved. In file nginx.conf the following line needed uncommenting. ``` Phusion Passenger config Uncomment it if you installed passenger or passenger-enterprise ``` include /etc/nginx/passenger.conf;
    3 By codecutter Nginx Ruby on Rails
  • Question

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

    Adding common proxy_pass to another container on server and getting this error (in title). Found some issues, but it seems they doesn't help me. :( Backend is on 8080 port netstat -plant ``` tcp 0 0 127.0....
    1 By usapharmacydashboard Nginx
  • Question

    [Nginx + Wordpress] Any endpoints not ending in .php return 404

    For example, trying to call /wp-admin results in 404, whereas /wp-admin/index.php works flawlessly. I reckon this won't play nice in the future. I imagine this has something to do with a rewrite issue, but I don't kno...
    Accepted Answer: I remedied this behaviour by moving the contents of my wordpress folder down into the wordpress/home directory. My project structure used to be: . ├── ecosystem.config.js/ ├── index.js/ ├── lib/ │   [...] ├── node_mo...
    2 By Medallyon Nginx WordPress Ubuntu 18.04
  • Question

    Unable to set Nginx reverse proxy in my droplet ubuntu 20.4?

    Hi Team, Am unable to copy and paste the below properly qs it is replacing the other code on /etc/nginx/sites-available/default nginx location / { proxy_pass http://localhost:3000; proxy_http_version 1...
    1 By shivaprasad Nginx
  • Question

    While trying to renew certbot certificate, got an error. (Nginx, Certbot, Node.js)

    This is the error: ``` Performing the following challenges: http-01 challenge for nginx: [warn] conflicting server name "" on, ignored nginx: [warn] conflicting server name ...
    Accepted Answer: I solved it, I needed to add the nginx pid number: ps -ef | grep nginx and then write the pid to the file located in /run/ Then I run the command again and it worked
    1 By belogolovnikas Nginx Node.js
  • Question

    Why Nginx add query string ?next= to my django url path

    Hi. i followed digitalocean tutorial at (
    0 By jlsk6 Django Nginx
  • Question

    nginx syntax error - listen directive not allowed

    Hello, I have been following through a few different articles, but am now getting an error. ``` "listen" directive not allowed here... listen [::]:443 ssl; # managed by certbot ``` After I set up certbot it was fine, ...
    Accepted Answer: Hi there, Can you run the following command to test your Nginx config syntax: sudo nginx -t And then share the output here. Also, can you share your whole Nginx server block here as well? Regards, Bobby
    2 By patrickb Nginx LEMP Let's Encrypt WordPress DigitalOcean
  • Question

    configuration for nginx for static files in Nodejs

    Hi all , I am a beginner with Node. I followed the guide and everything is working fine but I am havi...
    0 By angeloonofri Nginx Node.js
  • Question

    Fixing 502 Bad Gateway Nginx

    Hi, I am coming from youtube video about fixing 502 Bad Gateway Nginx. I have a Postal SMTP server installed on Ubunt...
    1 By amer001 Nginx Apache
  • Question

    Increase file upload size doesn't work (nginx.conf / php.ini)

    I'd like my site visitors to be able to upload photos through a simple form. I'm using Statamic CMS (v2) that's been deployed via Laravel Forge. I've added client_max_body_size 20M; in the http section of my nginx.con...
    2 By kvkooten Laravel PHP DigitalOcean Nginx Initial Server Setup Server Optimization
  • Question

    Nginx new server block still going to default page

    Hello, I am new to the Ubuntu world and have been following the article, however I have run into a bit of a problem! I have got to...
    2 By patrickb Nginx DigitalOcean Ubuntu 20.04 Ubuntu
  • Question

    Nginx always give me 504 error on wordpress

    I got nginx 504 Gateway Time-out when trying to install plugin from wordpress dashboard. this is the error I got from log. 2020/12/22 21:12:35 [error] 7695#0: *2188 upstream timed out (110: Connection timed out) while...
    1 By stupidboy Nginx CentOS 8 PHP WordPress
  • Question

    Проблема с прокси nginx с node js приложением

    Опишу вам поэтапно, как настраиваю сервер 1)Делаю дроплет на Centos 8 2)Вхожу в систему и меняю пароль 3)Создаю нового юзера и задаю пароль adduser shmzl passwd shmzl 4)Даю ему привилегию sudo gpasswd -a shmzl wheel 5...
    1 By mixup12 CentOS 8 Nginx Node.js MySQL
  • Question

    Error 404 when I slugify my url NGINX

    I was following this tutorial on how to deploy on digital ocean(Link) ( is able to find all...
    1 By tristanlimyj Nginx Django
  • Question

    Nginx converts POST request to GET request Laravel

    I have a running a Laravel project on Nginx, every thing works fine except when I want to login via the API, I use Passport for authentication, but when I try to login it returns with 404 and a message "The GET method...
    Accepted Answer: I solved it by adding SSL certification to the server and enabling HTTPS in server configuration.
    2 By abdelnasserahmed96 Nginx Laravel API
  • Question

    502 error for deploying flask + nginx + uwsgi in centos

    I was following the following tutorial: to deploy a flask app on our hosting but I am running into a pe...
    1 By abhyudayasrinet Python Flask Nginx CentOS
  • Question

    Fedora 33 with Nginx - This site can't be reached

    I am a long time user of Digital Ocean, I have managed multiple droplets regularly using CentOS or Ubuntu. So I decided today to use a Fedora 33 instance and install Nginx. So I did everything as always, my domain is ...
    1 By JWBrownie Nginx Fedora
  • Question

    Wordpress and nginx all pages works fine except for non-existent .php

    I configured my WordPress website on Nginx and everything works fine but for non-existent .php pages Those return the nginx default 404 page not found why ? location / { #try_files $uri $uri/ =404; try_fi...
    1 By mhcoding1 Nginx WordPress Ubuntu