Skip to content

Apache/Nginx configuration - How to link postgrest api with my domain name ? #2613

Answered by j-ova
GeoGyro asked this question in Q&A
Discussion options

You must be logged in to vote

Hello,

Can you give more details on the encountered error? What browser, what behavior, error codes, logs, ...?

Also, only one app can listen to a given port on a given IP.
You are giving conf details for Apache and Nginx, but unless you have a very particular network infrastructure, only one of them can receive your request on https://www.mywebsite.com/api/todos. Are you sure it is Nginx ?

As a side note, in your Nginx api.conf file, I would use the upstream you set up in the proxy_pass instruction, and maybe add the request uri (not sure if that one is necessary) :
proxy_pass http://postgrest$request_uri;

Edit: Not sure if it is another issue, but your server_name is set to answer on my…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@GeoGyro
Comment options

@j-ova
Comment options

@GeoGyro
Comment options

@j-ova
Comment options

@GeoGyro
Comment options

Answer selected by wolfgangwalther
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants