Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ssl_certificate /crt/ssl.crt;
- ssl_certificate_key /crt/ssl.key;
- # redirect 80 to 443
- server {
- listen 80;
- return 301 https://$host$request_uri;
- }
- # stop main domain access
- server {
- listen 443 ssl;
- server_name domain.com www.domain.com;
- ssl on;
- location / {
- return 404;
- }
- }
- # a service for example
- server {
- listen 443 ssl;
- server_name my.domain.com www.my.domain.com;
- ssl on;
- location / {
- proxy_pass http://localhost:8000;
- }
- }
- ssl_certificate /crt/ssl.crt;
- ssl_certificate_key /crt/ssl.key;
- # redirect 80 to 443
- server {
- listen 80;
- return 301 https://$host$request_uri;
- }
- # stop main domain access
- server {
- listen 443 ssl;
- server_name domain.com www.domain.com;
- ssl on;
- location / {
- return 404;
- }
- }
- # a service for example
- server {
- listen 443 ssl;
- server_name my.domain.com www.my.domain.com;
- ssl on;
- location / {
- proxy_pass http://yourip:8096;
- }
- }
- # redirect 80 to 443
- server {
- listen 80 default_server;
- return 301 https://$host$request_uri;
- }
Add Comment
Please, Sign In to add comment