Quantcast
Channel: Nginx Forum - Nginx Mailing List - English
Viewing all articles
Browse latest Browse all 7229

nginx as a forward proxy (kind of) (no replies)

$
0
0
Hi

I am very new to nginx and have a quick question.
I am using nginx to basically redirect certain websites through another
proxy. I am using DNS to resolve *.domain.com to the IP address of
nginx server.
I am able to get it to work with www.domain.com (see sample config
below) but would like it to redirect any subdomain (wildcard) to
corresponding subdomain. Any way to do this without having a similar
config for each subdomain?



server {
listen 192.168.1.80:443;
server_name *.domain.com;
ssl on;
ssl_certificate /tmp/test_cert.crt;
ssl_certificate_key /tmp/test_cert.key;
access_log /var/log/nginx/log/www.example.access.log main;
error_log /var/log/nginx/log/www.example.error.log;
location / {
proxy_pass https://www.domain.com;
}
}

--
Posted via http://www.ruby-forum.com/.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Viewing all articles
Browse latest Browse all 7229

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>