Custom domain settings

I created a node service and enabled a custom domain name.
The custom domain name is test.com.
I have deployed an nginx service in another cloud service provider. I want to point a path under my domain name to test.com, but it reports 502 Bad Gateway. How to solve it?
https://aaa.com/node/https://test.com/

Hi,

It’s hard to provide advice without specific details, e.g. real domains, reproduction steps, etc.

However, this doesn’t sound like a Render issue, but an Nginx configuration question. Maybe their docs on rewrites/redirects would help https://nginx.org/en/docs/http/ngx_http_rewrite_module.html

Alan

The node service running on render: https://nest-starter.kjxbyz.com/api

nginx config:

server {
    listen 80 default_server;
    server_name kjxbyz.com www.kjxbyz.com;

    return 301 https://www.kjxbyz.com$request_uri;
}

server {
    listen 443 ssl http2;
    server_name kjxbyz.com;

    ssl_certificate     /certs/kjxbyz.com.pem;
    ssl_certificate_key /certs/kjxbyz.com.key;
    ssl_session_timeout  5m;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4:!DH:!DHE;
    ssl_prefer_server_ciphers  on;

    return 301 https://www.kjxbyz.com$request_uri;
}

server {
    listen 443 ssl http2;
    server_name www.kjxbyz.com;
    charset     utf-8;

    ssl_certificate     /certs/kjxbyz.com.pem;
    ssl_certificate_key /certs/kjxbyz.com.key;
    ssl_session_timeout  5m;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4:!DH:!DHE;
    ssl_prefer_server_ciphers  on;

    add_header Access-Control-Allow-Origin *;

    location ^~ /nest-starter/ {
        proxy_pass         https://nest-starter.kjxbyz.com/;
        proxy_set_header   X-Real-IP            $remote_addr;
        proxy_set_header   X-Forwarded-For      $proxy_add_x_forwarded_for;
        proxy_set_header   X-Forwarded-Proto    $http_x_forwarded_proto;
    }

}

Accessing https://www.kjxbyz.com/nest-starter/api in the browser returns 502

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.