-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
404 message every route after creating the project #1088
Comments
I changed Nginx config to:
It worked ! I must load Strapi only on server root. That's why all Possible fix |
@matschik You can prefix the API routes, check out the documentation https://strapi.io/documentation/configurations/configurations.html#request |
This doesn't work. |
@Aurelsicoko Can you explain how that exactly works? I want to host my Strapi application on a Nginx server on a custom route just as described above (
I've got the same Nginx config as the original post:
|
@WesselKoorn I don't recommend this, it can be done with some very complex nginx configs (you are basically going to have to map just about every endpoint for your API which would be crazy complex) or do some crazy regex magic. Your best bet |
@derrickmehaffy Ok I will use a subdomain then, thanks for your reply! |
@derrickmehaffy Hi, even after using a subdomain,
and when accessed directly bypassing nginx and cloudflare:
It's all good then! This is my nginx config, which is again behind Cloudflare
I have been at this for sometime now, any hints would be great :) |
@faztp12 remove that trailing slash on your proxy_pass Short little useful guide: https://dev.to/danielkun/nginx-everything-about-proxypass-2ona |
I am also using strapi installed in subroute |
@vivex have you seen the new proxy documentation guides for the stable release? https://strapi.io/documentation/v3.x/getting-started/deployment.html#optional-software-guides |
Informations
What is the current behavior?
I get a 404 message when I'm going to
mydomain.com/strapi
.I redirect
mydomain.com/strapi
to port 1337 with Nginx.mydomain.com/strapi
PM2 logs
Nginx config
Steps to reproduce the problem
After creating the project with
strapi new myProject
, I launch the serverpm2 start server.js -n strapi
. Go tomydomain.com/strapi
after configuring nginx redirection and restarted Nginx.What is the expected behavior?
I must see strapi app.
The text was updated successfully, but these errors were encountered: