generated from tdymel/Rusty-Template
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dbe5887
commit 675bb70
Showing
2 changed files
with
57 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,56 @@ | ||
error_log /var/log/nginx/error.log; | ||
pid /var/run/nginx.pid; | ||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
server_tokens off; | ||
|
||
sendfile on; | ||
tcp_nopush on; | ||
tcp_nodelay on; | ||
|
||
client_body_timeout 120; | ||
client_header_timeout 120; | ||
keepalive_timeout 600; | ||
send_timeout 120; | ||
|
||
types_hash_max_size 4096; | ||
|
||
client_body_buffer_size 30K; | ||
client_header_buffer_size 10k; | ||
client_max_body_size 50m; | ||
large_client_header_buffers 2 10k; | ||
|
||
fastcgi_send_timeout 600; | ||
fastcgi_read_timeout 600; | ||
proxy_connect_timeout 600; | ||
proxy_send_timeout 600; | ||
proxy_read_timeout 600; | ||
|
||
open_file_cache max=2000 inactive=20s; | ||
open_file_cache_valid 60s; | ||
open_file_cache_min_uses 2; | ||
open_file_cache_errors off; | ||
|
||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
|
||
access_log on; | ||
error_log on; | ||
|
||
gzip on; | ||
gzip_disable "msie6"; | ||
|
||
include /etc/nginx/conf.d/*.conf; | ||
include /etc/nginx/sites-enabled/*; | ||
} | ||
server_names_hash_bucket_size 64; | ||
|
||
server { | ||
listen 80 default_server; | ||
listen [::]:80 default_server; | ||
server_name _; | ||
|
||
sendfile on; | ||
tcp_nodelay on; | ||
tcp_nopush on; | ||
server_tokens off; | ||
types_hash_max_size 4096; | ||
|
||
client_body_buffer_size 30K; | ||
client_header_buffer_size 10k; | ||
client_max_body_size 50m; | ||
large_client_header_buffers 2 10k; | ||
|
||
client_body_timeout 120; | ||
client_header_timeout 120; | ||
keepalive_timeout 600; | ||
send_timeout 120; | ||
|
||
fastcgi_send_timeout 600; | ||
fastcgi_read_timeout 600; | ||
proxy_connect_timeout 600; | ||
proxy_send_timeout 600; | ||
proxy_read_timeout 600; | ||
|
||
open_file_cache max=2000 inactive=20s; | ||
open_file_cache_valid 60s; | ||
open_file_cache_min_uses 2; | ||
open_file_cache_errors off; | ||
|
||
location /API/ { | ||
set $backend http://backend:8000; | ||
resolver 127.0.0.11 valid=30s; | ||
proxy_pass $backend; | ||
} | ||
|
||
location / { | ||
set $webclient http://webclient:80; | ||
resolver 127.0.0.11 valid=30s; | ||
proxy_pass $webclient; | ||
} | ||
|
||
location /static/ { | ||
set $filestorage http://filestorage:8080; | ||
resolver 127.0.0.11 valid=30s; | ||
proxy_pass $filestorage; | ||
|
||
autoindex on; # Enable directory listing | ||
autoindex_format json; # Use JSON format for listing (optional) | ||
index index.html; # Specify the custom index file | ||
} | ||
} |