-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Nginx routing problem, possibly #622
Comments
Hi @henriollik Here is what is did, working for me OOB : upstream strapi {
server 127.0.0.1:1337 max_fails=1 fail_timeout=5s;
}
server {
listen 80;
server_name strapi.localdomain;
access_log "/var/log/nginx/strapi.access.log";
error_log "/var/log/nginx/strapi.error.log";
root /mnt/hgfs/_wprojects/strapi/public;
index index.html;
location / {
try_files $uri $uri/ @strapi;
}
location @strapi{
proxy_pass http://strapi;
}
} Note : you need to start strapi to let it work as backend on 1337 port (or any other configured) $ strapi start Regards |
Hi @henriollik your problem looks come from you server config. |
Could you try with these instructions: https://medium.com/@strapi/how-to-deploy-a-strapi-api-on-ubuntu-16-04-17f8fbbf5c5b? |
@lauriejim Thank you. @rroblik I realize I can just use a subdomain for Strapi but I need to use a route. I got a test folder working with the same settings but Strapi doesn't seem to come through. @pierreburgy I am aware of this blog post, however I need to use a route for accessing Strapi, and in the same file as my main domain, if possible. I have a Polymer app on my domain and it hijacks all routes. So I need to set a definite route for Strapi on the server side. Creating a separate server block file for Strapi messed things up even further. |
@henriollik Do you have update about your issue ? |
@lauriejim I haven't tried anything new as I haven't had time to do so. So the issue still stands. |
@henriollik As we can see, it's not an issue from Strapi that's why we set |
I had follow your way. port 80 url was ok, but url/admin can not open. why? |
Hello @rroblik @lauriejim and @crotel. Sorry to necro this, but can I please ask of you all to edit my old username out of your comments? Edit: it's pointless now since GH stores all edits. |
Node.js version:
8.9.4
npm version:
3.10.10
Strapi version:
3.0.0-alpha.9.3
Operating system:
Ubuntu 16.04
Do you want to request a feature or report a bug?
Report a bug
What is the current behavior?
Can't access Strapi via the browser. Chrome console:
If the current behavior is a bug, please provide the steps to reproduce the problem
Follow the deployment steps on Ubuntu and set up nginx like this:
What is the expected behavior?
Strapi can be accessed via the browser.
Other info
I suspect something is wrong with my server blocks.
The text was updated successfully, but these errors were encountered: