By hiagos93
After finishing setting up the droplet and website code, I tried to access the website, but all browsers returned 404. I double checked everything to see possible mistakes I made, but everything looks ok.
Entering the droplet IP on the browser returns the nginx default page, meaning that the droplet itself is fine.
Then I concluded that the problem resides in the address redirection process, I’ve deleted the A and AAAA configs and created them again. Still nothing.
DigitalOcean apparently can’t redirect the url request to my droplet.
From what I’ve seen from other questions, some people are having problems related aswell.
ps aux | grep nginx
root 2916 0.0 0.0 141244 7028 ? Ss Jul11 0:00 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
www-data 2943 0.0 0.0 143832 6336 ? S Jul11 0:00 nginx: worker process
www-data 2944 0.0 0.0 143832 6336 ? S Jul11 0:00 nginx: worker process
www-data 2945 0.0 0.0 143832 6336 ? S Jul11 0:00 nginx: worker process
www-data 2946 0.0 0.0 143832 6336 ? S Jul11 0:00 nginx: worker process
root 3121 0.0 0.0 14856 1008 pts/1 S+ 00:04 0:00 grep --color=auto nginx
website: advicequest.com droplet ip: 67.205.160.73
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
I destroyed the droplet and rebuilt everything, setting nginx first and then the website code. It works now.
Hello,
Everything seems to be working just fine but you are redirecting your http traffic to https and it looks like that you have not configured Nginx to listen on port 443. You need to install an SSL certificate, sort out your server block for port 443 and the site will start loading as normal.
You can see the redirect simply by running this curl command
curl -IL advicequest.com
The output that you would get would be something like this:
HTTP/1.1 301 Moved Permanently
Server: nginx/1.14.0 (Ubuntu)
Date: Fri, 12 Jul 2019 04:22:45 GMT
Content-Type: text/html
Connection: keep-alive
Location: https://advicequest.com/
curl: (7) Failed to connect to advicequest.com port 443: Connection refused
```
Hope that this helps!
[Bobby](https://bobbyiliev.com)
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.