mirror of
				https://github.com/KevinMidboe/nginx.git
				synced 2025-10-29 17:50:26 +00:00 
			
		
		
		
	Moved all domains to separate config files
This commit is contained in:
		
							
								
								
									
										37
									
								
								sites-available/api.kevinmidboe.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								sites-available/api.kevinmidboe.conf
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,37 @@ | |||||||
|  |  | ||||||
|  | server { | ||||||
|  |  | ||||||
|  |   listen 443 ssl http2; | ||||||
|  |   listen [::]:443 ssl http2; | ||||||
|  |  | ||||||
|  |   server_name api.kevinmidboe.com; | ||||||
|  |  | ||||||
|  | 	ssl_certificate /etc/letsencrypt/live/api.kevinmidboe.com/fullchain.pem; # managed by Certbot | ||||||
|  | 	ssl_certificate_key /etc/letsencrypt/live/api.kevinmidboe.com/privkey.pem; # managed by Certbot | ||||||
|  |  | ||||||
|  |   location /files { | ||||||
|  |     alias /var/Www/public_files; | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   location /messenger { | ||||||
|  |     proxy_pass http://localhost:12322; | ||||||
|  | 		proxy_http_version 1.1; | ||||||
|  | 		proxy_set_header Upgrade $http_upgrade; | ||||||
|  | 		proxy_set_header X-Real-IP $remote_addr; | ||||||
|  | 		proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for; | ||||||
|  | 		proxy_set_header Connection 'upgrade'; | ||||||
|  | 		proxy_set_header Host $host; | ||||||
|  | 		proxy_cache_bypass $http_upgrade; | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   location /api { | ||||||
|  |     proxy_pass http://localhost:31459; | ||||||
|  | 		proxy_http_version 1.1; | ||||||
|  | 		proxy_set_header Upgrade $http_upgrade; | ||||||
|  | 		proxy_set_header X-Real-IP $remote_addr; | ||||||
|  | 		proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for; | ||||||
|  | 		proxy_set_header Connection 'upgrade'; | ||||||
|  | 		proxy_set_header Host $host; | ||||||
|  | 		proxy_cache_bypass $http_upgrade; | ||||||
|  |   } | ||||||
|  | } | ||||||
| @@ -18,37 +18,19 @@ | |||||||
|  |  | ||||||
| # Default server configuration | # Default server configuration | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | # Default should define all the routes to upgrade to https and global rules! | ||||||
|  |  | ||||||
| server { | server { | ||||||
|   |  | ||||||
| 	listen 80 default_server; | 	listen 80 default_server; | ||||||
| 	listen [::]:80 default_server; | 	listen [::]:80 default_server; | ||||||
| 	server_name leifsopplevelser.no elastic.kevinmidboe.com kibana.kevinmidboe.com ruterna.no api.kevinmidboe.com dev.kevinmidboe.com kevinmidboe.com; | 	server_name leifsopplevelser.no ruterna.no textbars.app *.kevinmidboe.com kevinmidboe.com; | ||||||
| 	return 302 https://$host$request_uri; | 	return 302 https://$host$request_uri; | ||||||
|  |  | ||||||
|  |  | ||||||
| } | } | ||||||
|  |  | ||||||
| server { |  | ||||||
|   listen 443; |  | ||||||
|   listen [::]:443; |  | ||||||
|    |  | ||||||
|   server_name ruterna.no; |  | ||||||
|  |  | ||||||
|   location / { |  | ||||||
|     proxy_pass http://localhost:30011/;  |  | ||||||
| proxy_http_version 1.1; |  | ||||||
|                 proxy_set_header Upgrade $http_upgrade; |  | ||||||
|                 proxy_set_header X-Real-IP $remote_addr; |  | ||||||
|                 proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for; |  | ||||||
|                 proxy_set_header Connection 'upgrade'; |  | ||||||
|                 proxy_set_header Host $host; |  | ||||||
|                 proxy_cache_bypass $http_upgrade; |  | ||||||
|   } |  | ||||||
|  |  | ||||||
|     ssl_certificate /etc/letsencrypt/live/ruterna.no/fullchain.pem; # managed by Certbot |  | ||||||
|     ssl_certificate_key /etc/letsencrypt/live/ruterna.no/privkey.pem; # managed by Certbot |  | ||||||
| } |  | ||||||
|  |  | ||||||
| server { | server { | ||||||
|     listen 443; |     listen 443; | ||||||
|     server_name sonarr.kevinmidboe.com; |     server_name sonarr.kevinmidboe.com; | ||||||
| @@ -61,6 +43,18 @@ server { | |||||||
|     ssl_certificate_key /etc/letsencrypt/live/sonarr.kevinmidboe.com/privkey.pem; # managed by Certbot |     ssl_certificate_key /etc/letsencrypt/live/sonarr.kevinmidboe.com/privkey.pem; # managed by Certbot | ||||||
| } | } | ||||||
|  |  | ||||||
|  | server { | ||||||
|  |     listen 443; | ||||||
|  |     server_name tau.kevinmidboe.com; | ||||||
|  |  | ||||||
|  |     location / { | ||||||
|  |         proxy_pass http://10.0.0.44:8181; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     ssl_certificate /etc/letsencrypt/live/tau.kevinmidboe.com/fullchain.pem; # managed by Certbot | ||||||
|  |     ssl_certificate_key /etc/letsencrypt/live/tau.kevinmidboe.com/privkey.pem; # managed by Certbot | ||||||
|  | } | ||||||
|  |  | ||||||
| server { | server { | ||||||
|     listen 443; |     listen 443; | ||||||
|     server_name xoa.kevinmidboe.com; |     server_name xoa.kevinmidboe.com; | ||||||
| @@ -92,29 +86,6 @@ server { | |||||||
|     ssl_certificate_key /etc/letsencrypt/live/xoa.kevinmidboe.com/privkey.pem; # managed by Certbot |     ssl_certificate_key /etc/letsencrypt/live/xoa.kevinmidboe.com/privkey.pem; # managed by Certbot | ||||||
| } | } | ||||||
|  |  | ||||||
| server { |  | ||||||
|     listen 443; |  | ||||||
|     server_name tau.kevinmidboe.com; |  | ||||||
|  |  | ||||||
|     location / { |  | ||||||
|         proxy_pass http://10.0.0.44:8181; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     ssl_certificate /etc/letsencrypt/live/tau.kevinmidboe.com/fullchain.pem; # managed by Certbot |  | ||||||
|     ssl_certificate_key /etc/letsencrypt/live/tau.kevinmidboe.com/privkey.pem; # managed by Certbot |  | ||||||
| } |  | ||||||
|  |  | ||||||
| server { |  | ||||||
|     listen 443; |  | ||||||
|     server_name kibana.kevinmidboe.com; |  | ||||||
|  |  | ||||||
|     location / { |  | ||||||
|         proxy_pass http://10.0.0.115:5601; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     ssl_certificate /etc/letsencrypt/live/kibana.kevinmidboe.com/fullchain.pem; # managed by Certbot |  | ||||||
|     ssl_certificate_key /etc/letsencrypt/live/kibana.kevinmidboe.com/privkey.pem; # managed by Certbot |  | ||||||
| } |  | ||||||
|  |  | ||||||
| server { | server { | ||||||
| 	listen 443; | 	listen 443; | ||||||
| @@ -133,44 +104,7 @@ server { | |||||||
|         } |         } | ||||||
| } | } | ||||||
|  |  | ||||||
| server { |  | ||||||
| 	# SSL configuration |  | ||||||
| 	# |  | ||||||
| 	listen 443 ssl default_server; |  | ||||||
| 	listen [::]:443 ssl default_server; |  | ||||||
| 	 |  | ||||||
| 	server_name api.kevinmidboe.com; |  | ||||||
|  |  | ||||||
| 	location /files { |  | ||||||
| 		alias /var/www/public_files/; |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	location /messenger { |  | ||||||
| 		proxy_pass http://localhost:12322; |  | ||||||
|         	proxy_http_version 1.1; |  | ||||||
|         	proxy_set_header Upgrade $http_upgrade; |  | ||||||
|         	proxy_set_header X-Real-IP $remote_addr; |  | ||||||
|         	proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for; |  | ||||||
|         	proxy_set_header Connection 'upgrade'; |  | ||||||
|         	proxy_set_header Host $host; |  | ||||||
|         	proxy_cache_bypass $http_upgrade; |  | ||||||
| 	} |  | ||||||
|     ssl_certificate /etc/letsencrypt/live/api.kevinmidboe.com/fullchain.pem; # managed by Certbot |  | ||||||
|     ssl_certificate_key /etc/letsencrypt/live/api.kevinmidboe.com/privkey.pem; # managed by Certbot |  | ||||||
|  |  | ||||||
|         location /api { |  | ||||||
| 		proxy_pass http://localhost:31459; |  | ||||||
| 		proxy_http_version 1.1; |  | ||||||
| 		proxy_set_header Upgrade $http_upgrade; |  | ||||||
| 		proxy_set_header X-Real-IP $remote_addr; |  | ||||||
| 		proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for; |  | ||||||
| 		proxy_set_header Connection 'upgrade'; |  | ||||||
| 		proxy_set_header Host $host; |  | ||||||
| 		proxy_cache_bypass $http_upgrade; |  | ||||||
| 	} |  | ||||||
| 	ssl_certificate /etc/letsencrypt/live/api.kevinmidboe.com/fullchain.pem; # managed by Certbot |  | ||||||
| 	ssl_certificate_key /etc/letsencrypt/live/api.kevinmidboe.com/privkey.pem; # managed by Certbot |  | ||||||
| } |  | ||||||
|  |  | ||||||
| server { | server { | ||||||
| 	listen 443; | 	listen 443; | ||||||
| @@ -240,122 +174,3 @@ if ($request_method = OPTIONS ) { | |||||||
|     ssl_certificate_key /etc/letsencrypt/live/kevinmidboe.com/privkey.pem; # managed by Certbot |     ssl_certificate_key /etc/letsencrypt/live/kevinmidboe.com/privkey.pem; # managed by Certbot | ||||||
| } | } | ||||||
|  |  | ||||||
| server { |  | ||||||
|         listen 443; |  | ||||||
|         listen [::]:443; |  | ||||||
|  |  | ||||||
|         server_name textbars.app; |  | ||||||
|  |  | ||||||
| 	location / { |  | ||||||
| 		root /home/kevin/wavecube; |  | ||||||
| 		include /etc/nginx/mime.types; |  | ||||||
|  |  | ||||||
|                 proxy_pass http://localhost:3000; |  | ||||||
|  |  | ||||||
|                 proxy_http_version 1.1; |  | ||||||
|                 proxy_set_header Upgrade $http_upgrade; |  | ||||||
|                 proxy_set_header X-REAL-IP $remote_addr; |  | ||||||
|                 proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for; |  | ||||||
|                 proxy_set_header Connection 'upgrade'; |  | ||||||
|                 proxy_set_header Host $host; |  | ||||||
|                 proxy_cache_bypass $http_upgrade; |  | ||||||
|  |  | ||||||
| 	} |  | ||||||
|     ssl_certificate /etc/letsencrypt/live/textbars.app/fullchain.pem; # managed by Certbot |  | ||||||
|     ssl_certificate_key /etc/letsencrypt/live/textbars.app/privkey.pem; # managed by Certbot |  | ||||||
|  |  | ||||||
|  |  | ||||||
| } |  | ||||||
|  |  | ||||||
| server { |  | ||||||
|     listen 443; |  | ||||||
|     listen [::]:443; |  | ||||||
|  |  | ||||||
|     server_name api.leifsopplevelser.no; |  | ||||||
|  |  | ||||||
|     location / { |  | ||||||
|         proxy_pass http://localhost:30021; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     ssl_certificate /etc/letsencrypt/live/api.leifsopplevelser.no/fullchain.pem; # managed by Certbot |  | ||||||
|     ssl_certificate_key /etc/letsencrypt/live/api.leifsopplevelser.no/privkey.pem; # managed by Certbot |  | ||||||
| } |  | ||||||
|  |  | ||||||
| server { |  | ||||||
|     listen 443; |  | ||||||
|     listen [::]:443; |  | ||||||
|  |  | ||||||
|     server_name upload.leifsopplevelser.no; |  | ||||||
|  |  | ||||||
|     location / { |  | ||||||
|         proxy_pass http://localhost:30022; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     ssl_certificate /etc/letsencrypt/live/upload.leifsopplevelser.no/fullchain.pem; # managed by Certbot |  | ||||||
|     ssl_certificate_key /etc/letsencrypt/live/upload.leifsopplevelser.no/privkey.pem; # managed by Certbot |  | ||||||
| } |  | ||||||
|  |  | ||||||
| server { |  | ||||||
| 	listen 443; |  | ||||||
| 	listen [::]:443; |  | ||||||
|  |  | ||||||
| 	server_name leifsopplevelser.no; |  | ||||||
|  |  | ||||||
|     location /assets { |  | ||||||
|         root /home/kevin/leifs-image-processor/; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
| 	location / { |  | ||||||
| 		proxy_pass http://localhost:30020; |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
|     ssl_certificate /etc/letsencrypt/live/leifsopplevelser.no/fullchain.pem; # managed by Certbot |  | ||||||
|     ssl_certificate_key /etc/letsencrypt/live/leifsopplevelser.no/privkey.pem; # managed by Certbot |  | ||||||
| } |  | ||||||
|  |  | ||||||
| server { |  | ||||||
|     listen 443; |  | ||||||
|     listen [::]:443; |  | ||||||
|  |  | ||||||
|     server_name elastic.kevinmidboe.com kevinmidboe.com; |  | ||||||
|  |  | ||||||
|     location / { |  | ||||||
|         add_header 'Access-Control-Allow-Origin' "https://kevinmidboe.com"; |  | ||||||
|                 proxy_http_version 1.1; |  | ||||||
|                 proxy_set_header Upgrade $http_upgrade; |  | ||||||
|                 proxy_set_header X-Real-IP $remote_addr; |  | ||||||
|                 proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for; |  | ||||||
|                 proxy_set_header Connection 'upgrade'; |  | ||||||
|                 proxy_set_header Host $host; |  | ||||||
|                 proxy_cache_bypass $http_upgrade; |  | ||||||
|  |  | ||||||
| if ($request_method = 'OPTIONS') { |  | ||||||
|         add_header 'Access-Control-Allow-Origin' '*'; |  | ||||||
|         add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; |  | ||||||
|         # |  | ||||||
|         # Custom headers and headers various browsers *should* be OK with but aren't |  | ||||||
|         # |  | ||||||
|         add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; |  | ||||||
|         # |  | ||||||
|         # Tell client that this pre-flight info is valid for 20 days |  | ||||||
|         # |  | ||||||
|         add_header 'Access-Control-Max-Age' 1728000; |  | ||||||
|         add_header 'Content-Type' 'text/plain; charset=utf-8'; |  | ||||||
|         add_header 'Content-Length' 0; |  | ||||||
|         return 204; |  | ||||||
|      } |  | ||||||
|      if ($request_method = 'GET') { |  | ||||||
|         add_header 'Access-Control-Allow-Origin' '*'; |  | ||||||
|         add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; |  | ||||||
|         add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; |  | ||||||
|         add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range'; |  | ||||||
|      } |  | ||||||
|  |  | ||||||
|         proxy_pass http://10.0.0.115:9301; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     ssl_certificate /etc/letsencrypt/live/elastic.kevinmidboe.com/fullchain.pem; # managed by Certbot |  | ||||||
|     ssl_certificate_key /etc/letsencrypt/live/elastic.kevinmidboe.com/privkey.pem; # managed by Certbot |  | ||||||
| } |  | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										54
									
								
								sites-available/elastic.kevinmidboe.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										54
									
								
								sites-available/elastic.kevinmidboe.conf
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,54 @@ | |||||||
|  |  | ||||||
|  |  | ||||||
|  | server { | ||||||
|  |   listen 443 ssl http2; | ||||||
|  |   listen [::]:443 ssl http2; | ||||||
|  |  | ||||||
|  |   server_name kibana.kevinmidboe.com; | ||||||
|  |  | ||||||
|  |   location / { | ||||||
|  |  | ||||||
|  |     proxy_pass http://10.0.0.115:5601; | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   ssl_certificate /etc/letsencrypt/live/kibana.kevinmidboe.com/fullchain.pem; # managed by Certbot | ||||||
|  |   ssl_certificate_key /etc/letsencrypt/live/kibana.kevinmidboe.com/privkey.pem; # managed by Certbot | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | server { | ||||||
|  |   listen 443 ssl http2; | ||||||
|  |   listen [::]:443 ssl http2; | ||||||
|  |  | ||||||
|  |   server_name elastic.kevinmidboe.com; | ||||||
|  |  | ||||||
|  |   location / { | ||||||
|  |     add_header 'Access-Control-Allow-Origin' 'https://kevinmidboe.com'; | ||||||
|  |     proxy_http_version 1.1; | ||||||
|  |     proxy_set_header Upgrade $http_upgrade; | ||||||
|  |     proxy_set_header X-Real-IP $remote_addr; | ||||||
|  |     proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for; | ||||||
|  |     proxy_set_header Connection 'upgrade'; | ||||||
|  |     proxy_set_header Host $host; | ||||||
|  |     proxy_cache_bypass $http_upgrade; | ||||||
|  |  | ||||||
|  |     if ($request_method = 'OPTIONS') { | ||||||
|  |       add_header 'Access-Control-Allow-Origin' 'https://kevinmidboe.com'; | ||||||
|  |       add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; | ||||||
|  |       add_header 'Content-Type' 'application/json; charset=utf-8'; | ||||||
|  |       add_header 'Content-Length' 0; | ||||||
|  |       return 204; | ||||||
|  |     } | ||||||
|  |     if ($request_method = 'GET') { | ||||||
|  |       add_header 'Access-Control-Allow-Origin' 'https://kevinmidboe.com'; | ||||||
|  |       add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; | ||||||
|  |       add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; | ||||||
|  |       add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range'; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     proxy_pass http://10.0.0.115:9301; | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   ssl_certificate /etc/letsencrypt/live/kibana.kevinmidboe.com/fullchain.pem; # managed by Certbot | ||||||
|  |   ssl_certificate_key /etc/letsencrypt/live/kibana.kevinmidboe.com/privkey.pem; # managed by Certbot | ||||||
|  | } | ||||||
							
								
								
									
										48
									
								
								sites-available/leifsopplevelser.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										48
									
								
								sites-available/leifsopplevelser.conf
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,48 @@ | |||||||
|  |  | ||||||
|  | server { | ||||||
|  |   listen 443 ssl http2; | ||||||
|  |   listen [::]:443 ssl http2; | ||||||
|  |  | ||||||
|  |   ssl_certificate /etc/letsencrypt/live/leifsopplevelser.no/fullchain.pem; | ||||||
|  |   ssl_certificate_key /etc/letsencrypt/live/leifsopplevelser.no/privkey.pem; | ||||||
|  |  | ||||||
|  |   server_name *.leifsopplevelser.no, leifsopplevelser.no; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | server { | ||||||
|  |   listen 443 ssl http2; | ||||||
|  |   listen [::]:443 ssl http2; | ||||||
|  |  | ||||||
|  |   server_name api.leifsopplevelser.no; | ||||||
|  |  | ||||||
|  |   location / { | ||||||
|  |     proxy_pass http://localhost:30021; | ||||||
|  |   } | ||||||
|  | } | ||||||
|  |  | ||||||
|  | server { | ||||||
|  |   listen 443 ssl http2; | ||||||
|  |   listen [::]:443 ssl http2; | ||||||
|  |  | ||||||
|  |   server_name upload.leifsopplevelser.no; | ||||||
|  |  | ||||||
|  |   location / { | ||||||
|  |     proxy_pass http://localhost:30022;   | ||||||
|  |   } | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | server { | ||||||
|  |   listen 443 ssl http2; | ||||||
|  |   listen [::]:443 ssl http2; | ||||||
|  |  | ||||||
|  |   server_name leifsopplevelser.no; | ||||||
|  |  | ||||||
|  |   location /assets { | ||||||
|  |     root /home/kevin/leifs-image-processor; | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   location / { | ||||||
|  |     proxy_pass http://localhost:30020; | ||||||
|  |   } | ||||||
|  | } | ||||||
| @@ -1,18 +0,0 @@ | |||||||
| # upstream s3 { |  | ||||||
| #   server s3.eu-central-1.amazonaws.com:443; |  | ||||||
| # } |  | ||||||
|  |  | ||||||
| server { |  | ||||||
|     if ($host = ruterna.no) { |  | ||||||
|         return 301 https://$host$request_uri; |  | ||||||
|     } # managed by Certbot |  | ||||||
|  |  | ||||||
|  |  | ||||||
|     server_name ruterna.no; |  | ||||||
|  |  | ||||||
|     location / { |  | ||||||
|         proxy_pass https://s3.eu-central-1.amazonaws.com/miljohack; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|  |  | ||||||
| } |  | ||||||
							
								
								
									
										22
									
								
								sites-available/ruterna.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								sites-available/ruterna.conf
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,22 @@ | |||||||
|  |  | ||||||
|  | server { | ||||||
|  |   listen 443 ssl http2; | ||||||
|  |   listen [::]:443 ssl http2; | ||||||
|  |  | ||||||
|  |   server_name ruterna.no; | ||||||
|  |  | ||||||
|  |   location / { | ||||||
|  |     proxy_http_version 1.1; | ||||||
|  |     proxy_set_header Upgrade $http_upgrade; | ||||||
|  |     proxy_set_header X-Real-IP $remote_addr; | ||||||
|  |     proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for; | ||||||
|  |     proxy_set_header Connection 'upgrade'; | ||||||
|  |     proxy_set_header Host $host; | ||||||
|  |     proxy_cache_bypass $http_upgrade; | ||||||
|  |  | ||||||
|  |     proxy_pass http://localhost:30011/;  | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   ssl_certificate /etc/letsencrypt/live/ruterna.no/fullchain.pem; # managed by Certbot | ||||||
|  |   ssl_certificate_key /etc/letsencrypt/live/ruterna.no/privkey.pem; # managed by Certbot | ||||||
|  | } | ||||||
							
								
								
									
										23
									
								
								sites-available/textbars.app.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								sites-available/textbars.app.conf
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,23 @@ | |||||||
|  |  | ||||||
|  | server { | ||||||
|  |   listen 443 ssl http2; | ||||||
|  |   listen [::]:443 ssl http2; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |   location / { | ||||||
|  |     root /home/kevin/wavecube; | ||||||
|  |     include /etc/nginx/mime.types; | ||||||
|  |    | ||||||
|  |     proxy_http_version 1.1; | ||||||
|  |     proxy_set_header Upgrade $http_upgrade; | ||||||
|  |     proxy_set_header X-REAL-IP $remote_addr; | ||||||
|  |     proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for; | ||||||
|  |     proxy_set_header Connection 'upgrade'; | ||||||
|  |     proxy_set_header Host $host; | ||||||
|  |     proxy_cache_bypass $http_upgrade; | ||||||
|  |     proxy_pass http://localhost:3000; | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   ssl_certificate /etc/letsencrypt/live/textbars.app/fullchain.pem; # managed by Certbot | ||||||
|  |   ssl_certificate_key /etc/letsencrypt/live/textbars.app/privkey.pem; # managed by Certbot | ||||||
|  | } | ||||||
		Reference in New Issue
	
	Block a user