mirror of
				https://github.com/KevinMidboe/nginx.git
				synced 2025-10-29 17:50:26 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			38 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			38 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| 
 | |
| 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;
 | |
|   }
 | |
| }
 |