Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # https://serverfault.com/q/975135/92023
- server {
- listen 80;
- server_name jira.domain.com;
- return 301 https://$host$request_uri;
- }
- server {
- listen 80;
- server_name subdomain1.domain.com;
- return 301 https://$host$request_uri;
- }
- server {
- listen 80;
- server_name subdomain2.domain.com;
- return 301 https://$host$request_uri;
- }
- server {
- listen 443 ssl;
- server_name jira.domain.com;
- server_tokens off;
- location / {
- proxy_set_header Host $server_name;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forewarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_set_header Authorization "";
- proxy_pass http://127.0.0.1:8080; #Jira port
- }
- #certbot ssl settings
- #include /etc/nginx/global-ssl-settings.conf
- #htaccess settings
- }
- server {
- listen 443 ssl;
- server_name subdomain1.domain.com;
- root /var/www/subdomain1.domain.com
- location / {
- index index.html index.php
- }
- #certbot ssl settings
- #htaccess settings
- }
- server {
- listen 443 ssl;
- server_name subdomain2.domain.com;
- root /var/www/subdomain2.domain.com
- location / {
- index index.html index.php
- }
- #certbot ssl settings
- #htaccess settings
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement