Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- *.example.com -> 1.2.3.4
- *.anotherexample.com -> 1.2.3.4
- server {
- listen 80;
- server_name
- example.com
- www.example.com
- *.example.com;
- location /.well-known {
- alias /var/www/html/letsencrypt;
- }
- location / {
- proxy_pass_header Authorization;
- proxy_pass http://address.of-the.internal.example-webserver
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_http_version 1.1;
- proxy_set_header Connection "";
- proxy_buffering off;
- client_max_body_size 0;
- proxy_read_timeout 36000s;
- proxy_redirect off;
- access_log /var/log/nginx/example.com.log;
- error_log /var/log/nginx/example.com.log error;
- }
- }
- server {
- listen 80;
- server_name
- anotherexample.com
- www.anotherexample.com
- *.anotherexample.com;
- location /.well-known {
- alias /var/www/html/letsencrypt;
- }
- location / {
- proxy_pass_header Authorization;
- proxy_pass http://address.of-the.internal.anotherexample-webserver
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_http_version 1.1;
- proxy_set_header Connection "";
- proxy_buffering off;
- client_max_body_size 0;
- proxy_read_timeout 36000s;
- proxy_redirect off;
- access_log /var/log/nginx/anotherexample.com.log;
- error_log /var/log/nginx/anotherexample.com.log error;
- }
- }
- server {
- listen 80;
- server_name application1.example.com;
- location / {
- proxy_pass_header Authorization;
- proxy_pass http://internal.address.of-example-app-one
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_http_version 1.1;
- proxy_set_header Connection "";
- proxy_buffering off;
- client_max_body_size 0;
- proxy_read_timeout 36000s;
- proxy_redirect off;
- access_log /var/log/nginx/exampleappone.access.log;
- error_log /var/log/nginx/exampleappone.error.log error;
- }
- }
- server {
- listen 80;
- server_name application2.example.com;
- location / {
- proxy_pass_header Authorization;
- proxy_pass http://internal.address.of-example-app-two
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_http_version 1.1;
- proxy_set_header Connection "";
- proxy_buffering off;
- client_max_body_size 0;
- proxy_read_timeout 36000s;
- proxy_redirect off;
- access_log /var/log/nginx/exampleapptwo.access.log;
- error_log /var/log/nginx/exampleapptwo.error.log error;
- }
- }
- server {
- listen 80;
- server_name application1.anotherexample.com;
- location / {
- proxy_pass_header Authorization;
- proxy_pass http://internal.address.of-anotherexample-app-one
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_http_version 1.1;
- proxy_set_header Connection "";
- proxy_buffering off;
- client_max_body_size 0;
- proxy_read_timeout 36000s;
- proxy_redirect off;
- access_log /var/log/nginx/anotherexampleappone.access.log;
- error_log /var/log/nginx/anotherexampleappone.error.log error;
- }
- }
Add Comment
Please, Sign In to add comment