@justoverclock Any update ?
Thanks
EDIT - marking as solved based on the below thread
https://sudonix.com/topic/339/digitalocean-step-by-step-guide-to-nginx-configuration
@phenomlab well, i’ve learned something new, no its a private crm developed by me, so no external use
@justoverclock Exactly - that’s why I asked You won’t be exposing the API then. Any issues, let me know.
@phenomlab ok i’ll try later when people are not using the crm :P, and i’ll post here the result
@justoverclock No problems.
@phenomlab its odd but doesn’t work if i use https://vfgest.it:3030 or https://SERVERIP:3030 or https://127.0.0.1:3030
must be something related to proxy…because server and client are on the same server…but works if i restore all to previous unsecure http connection
@justoverclock i’ve found an article that says
To resolve your issue you can setup nginx to proxy your http backend urls via https. With nginx server you will need to call your api like https://your_domain/api/some_path and nginx will proxy your request to api host, that you will set in config
so my server actually is on port 3030, what should i do?
thx!
@justoverclock ok i’ve found the solution by myself watching your files…
-i’ve created a subdomain
all works fine
@justoverclock Beat me to it ! I was going to say that you could add another server block to the existing configuration, so for example
location /api {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://127.0.0.1:3030/;
proxy_redirect off;
# Socket.IO Support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
@phenomlab i’m learning ahahahah
@justoverclock said in Digitalocean step by step guide to nginx configuration:
i’m learning
And that’s the whole point of this site If you don’t learn anything, you gain nothing.