- A+
所属分类:未分类
工具地址:nginx配置在线生成
帮助文档:帮助文档
基础配置如下图:
server配置如下图:
结果如下:
# Generated by xubo it.baiked.com
user nginx;
pid /run/nginx.pid;
worker_processes auto;
worker_rlimit_nofile 65535;
events {
multi_accept on;
worker_connections 65535;
}
http {
charset utf-8;
tcp_nopush on;
types_hash_max_size 2048;
client_max_body_size 1M;
# MIME
include mime.types;
default_type application/octet-stream;
# logging
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log warn;
# load configs
include /etc/nginx/conf.d/*.conf;
# www.example.com
server {
listen 80;
listen [::]:80;
server_name www.example.com;
set $base /var/www/www.example.com;
root $base/public;
# Python
location / {
# default uwsgi_params
include uwsgi_params;
# uwsgi settings
uwsgi_pass unix:/tmp/uwsgi.sock;
uwsgi_param Host $host;
uwsgi_param X-Real-IP $remote_addr;
uwsgi_param X-Forwarded-For $proxy_add_x_forwarded_for;
uwsgi_param X-Forwarded-Proto $http_x_forwarded_proto;
}
}
}
- 安卓客户端下载
- 微信扫一扫
- 微信公众号
- 微信公众号扫一扫