Report this

What is the reason for this report?

Configure subdomain of different host on nginx server which is configured on some other host.

Posted on December 5, 2020

I am trying to configure host name like www.abc.com on my already setup of nginx server with server_name like www.test.com. Both test.com and abc.com have different ssl certificates.

I have configured server for www.abc.com like below

server {
	
	listen 443 ssl;
	server_name www.abc.com;	

		
	ssl_certificate /usr/local/etc/nginx/ssl/self1.crt;
	ssl_certificate_key /usr/local/etc/nginx/ssl/self1.key;	

	location /temp {
		proxy_pass https://www.test.com/;
	}
}

I am curious whether this is the proper way to achieve this or there is any better way. Thanks.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.