Embark on a journey of knowledge! Take the quiz and earn valuable credits.
Take A QuizChallenge yourself and boost your learning! Start the quiz now to earn credits.
Take A QuizUnlock your potential! Begin the quiz, answer questions, and accumulate credits along the way.
Take A QuizKindly log in to use this feature. We’ll take you to the login page automatically.
LoginGeneral Tech Bugs & Fixes 3 years ago
User submissions are the sole responsibility of contributors, with TuteeHUB disclaiming liability for accuracy, copyrights, or consequences of use; content is for informational purposes only and not professional advice.
No matter what stage you're at in your education or career, TuteeHUB will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
Kindly log in to use this feature. We’ll take you to the login page automatically.
Login
Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.
Your experience on this site will be improved by allowing cookies. Read Cookie Policy
Your experience on this site will be improved by allowing cookies. Read Cookie Policy
manpreet
Best Answer
3 years ago
I am using nginx as a reverse proxy to serve my various node and react applications. Basically I set a subdomain for each application.
I can query https://demo.myapp.com/ and it gets passed to the correct underlying app but if I query https://demo.myapp.com/login I get a 404. note that I get "404 Not Found" as plain text, no html no nothing.
I find this odd because I copy pasted the config of my other apps and I can definitely callhttps://myotherapp.myapp.com/login. I have looked online but I didn't find any help on this matter (because I didn't really find a way to formulate my problem ?)
Here's my config (domain names are anonymized but it's exactly the same structure)
server { listen 80 default_server; listen [::]:80 default_server; server_name _; return 301 https://$host$request_uri; } # this one works fine when I call sc.example.io/login server { server_name sc.example.io; location / { proxy_pass http://127.0.0.1:5102; } listen 443 ssl; # managed by Certbot ssl_certificate /etc/letsencrypt/live/example.io/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/example.io/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot } #this ones 404's when I call demo.example.io/login server { server_name demo.example.io; location / { proxy_pass http://127.0.0.1:5110; } listen 443 ssl; # managed by Certbot ssl_certificate /etc/letsencrypt/live/example.io/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/example.io/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot } server { if ($host = sc.example.io) { return 301 https://$host$request_uri; } # managed by Certbot server_name sc.example.io; listen 80; return 404; # managed by Certbot } server { if ($host = demo.example.io) { return 301 https://$host$request_uri; } # managed by Certbot server_name demo.example.io; listen 80; return 404; # managed by Certbot }