44 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Nginx Configuration File
		
	
	
	
	
	
		
		
			
		
	
	
			44 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Nginx Configuration File
		
	
	
	
	
	
|  | events { | ||
|  |     worker_connections 1024; | ||
|  | } | ||
|  | 
 | ||
|  | http { | ||
|  |     include /etc/nginx/mime.types; | ||
|  |     default_type application/octet-stream; | ||
|  |      | ||
|  |     sendfile on; | ||
|  |     keepalive_timeout 65; | ||
|  | 
 | ||
|  |     server { | ||
|  |         listen 80; | ||
|  |          | ||
|  |         server_name candivista.com www.candivista.com _; | ||
|  | 
 | ||
|  |         # Frontend - everything goes to frontend by default
 | ||
|  |         location / { | ||
|  |             proxy_pass http://frontend:3000; | ||
|  |             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_set_header X-Forwarded-Proto $scheme; | ||
|  |         } | ||
|  | 
 | ||
|  |         # Backend API
 | ||
|  |         location /rest { | ||
|  |             proxy_pass http://backend:8083/rest; | ||
|  |             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_set_header X-Forwarded-Proto $scheme; | ||
|  |         } | ||
|  | 
 | ||
|  |         # Backend docs
 | ||
|  |         location /doc { | ||
|  |             proxy_pass http://backend:8083/doc; | ||
|  |             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_set_header X-Forwarded-Proto $scheme; | ||
|  |         } | ||
|  |     } | ||
|  | } |