mirror of
https://github.com/RobbieHan/sandboxMP.git
synced 2026-02-04 03:13:15 +08:00
64 lines
1.7 KiB
Nginx Configuration File
64 lines
1.7 KiB
Nginx Configuration File
worker_processes 1;
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
http {
|
|
|
|
include mime.types;
|
|
default_type application/octet-stream;
|
|
server_tokens off;
|
|
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
|
'$status $body_bytes_sent "$http_referer" '
|
|
'"$http_user_agent" "$http_x_forwarded_for"';
|
|
log_format nginxlog '$http_host '
|
|
'$remote_addr [$time_local] '
|
|
'"$request" $status $body_bytes_sent '
|
|
'"$http_referer" "$http_user_agent" '
|
|
'$request_time '
|
|
'$upstream_response_time';
|
|
access_log /var/log/nginx/access.log nginxlog;
|
|
keepalive_timeout 60;
|
|
client_header_timeout 10;
|
|
client_body_timeout 15;
|
|
client_max_body_size 100M;
|
|
client_body_buffer_size 1024k;
|
|
gzip on;
|
|
gzip_min_length 1;
|
|
gzip_buffers 4 16k;
|
|
gzip_http_version 1.1;
|
|
gzip_comp_level 3;
|
|
gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png app lication/vnd.ms-fontobject application/x-font-ttf image/svg+xml;
|
|
gzip_vary on;
|
|
|
|
|
|
|
|
upstream sandboxmp {
|
|
server 127.0.0.1:9000;
|
|
}
|
|
|
|
server {
|
|
|
|
listen 80;
|
|
server_name 0.0.0.0;
|
|
charset utf-8;
|
|
client_max_body_size 75M;
|
|
|
|
|
|
|
|
location /static {
|
|
|
|
alias /opt/app/sandboxMP/static;
|
|
|
|
}
|
|
|
|
location /media {
|
|
|
|
alias /opt/app/sandboxMP/media;
|
|
}
|
|
|
|
location / {
|
|
uwsgi_pass sandboxmp;
|
|
include /etc/nginx/uwsgi_params;
|
|
}
|
|
}
|
|
} |