65 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
			
		
		
	
	
			65 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
| server {
 | |
|     listen 80;
 | |
|     server_name _;
 | |
| 
 | |
|     # Static resources
 | |
|     location / {
 | |
|         root   /usr/share/nginx/html;
 | |
|         try_files $uri $uri/ /index.html;
 | |
|         index  index.html index.htm;
 | |
|         autoindex on;
 | |
|         autoindex_exact_size off;
 | |
|         autoindex_localtime on;
 | |
|     }
 | |
| 
 | |
|     # API proxy
 | |
|     location /api/ {
 | |
|         proxy_pass http://coze-server:8888;
 | |
|         
 | |
|         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;
 | |
|         
 | |
|         # SSL/TLS settings
 | |
|         proxy_ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
 | |
|         proxy_ssl_verify off;
 | |
|     }
 | |
| }
 | |
| 
 | |
| # if you want to use https, you can uncomment the following code
 | |
| # server {
 | |
| #     listen 443 ssl;
 | |
| #     server_name _;
 | |
| 
 | |
| #     ssl_certificate /etc/nginx/ssl/pem;
 | |
| #     ssl_certificate_key /etc/nginx/ssl/key;
 | |
| #     ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
 | |
| #     ssl_prefer_server_ciphers on;
 | |
| #     ssl_session_cache shared:SSL:10m;
 | |
| #     ssl_session_timeout 10m;
 | |
| 
 | |
| #     # Static resources
 | |
| #     location / {
 | |
| #         root   /usr/share/nginx/html;
 | |
| #         try_files $uri $uri/ /index.html;
 | |
| #         index  index.html index.htm;
 | |
| #         autoindex on;
 | |
| #         autoindex_exact_size off;
 | |
| #         autoindex_localtime on;
 | |
| #     }
 | |
| 
 | |
| #     # API proxy
 | |
| #     location /api/ {
 | |
| #         proxy_pass https://coze-server:8888;
 | |
|         
 | |
| #         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;
 | |
|         
 | |
| #         # SSL/TLS settings
 | |
| #         proxy_ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
 | |
| #         proxy_ssl_verify off;
 | |
| #     }
 | |
| # }  |