Closed MichaelUyy closed 8 years ago
A couple questions to start:
sites-enabled
exactly match the example in the tutorial? If not, please share it.This may fall outside the scope of the tutorial, but if I can spot the issue I'll try to help.
Hi Jason,
I am getting the 404 on my repo and yes, I have my configuration for nginx exactly as what you have included in the guide
If you're getting the 404 from your app, that suggests that it's not Nginx. I'd recommend looking into Express routing on Stack Overflow to see where the issue lies. You could also try logging all the things; maybe it's a file path issue?
Whatever it is, I'm pretty sure this isn't an Nginx configuration issue since the routes are sending you a 404 through Express.
I think that's about as far as I can go, though; we're moving into Express support, which is outside the scope of this app. I'm going to close this issue, but if it turns out I'm wrong and it is an issue with Nginx, let me know here and we'll revisit this.
Good luck!
I actually opened this issue with stackoverflow as well and one response said that it was an issue with nginx since everything on my server.js turned out to be fine.
http://stackoverflow.com/questions/40573567/express-js-with-node-js
Also a quick update. I have just recently viewed the error.log file and it shows that the other pages are not found on their directories even though they are actually there.
Another update. I have placed one of my html files to the main directory. For the URL, I tried accessing michaeluy.me/resume.html and it works. However, how do I get rid of the file extension?
Hey, @MichaelUyy — I see that you found a solution here: http://stackoverflow.com/questions/40573567/express-js-with-node-js
Glad to hear you got it worked out!
I am encountering a problem where if I access other pages of my website. I will be sent to the 404 page. Now i believe that there is just a piece of code that is missing at the etc/nginx/sites-enabled/default file since I think that it is only configured for the index page.
Here is my github repo: https://github.com/MichaelUyy/michaeluyme
And here is the guide that I have followed all through out: https://code.lengstorf.com/deploy-nodejs-ssl-digitalocean/
My question here is how do I configure nginx for me to be able to access other pages of my website.
If anyone can help me here, that would be great. Thanks