国产成人精品久久免费动漫-国产成人精品天堂-国产成人精品区在线观看-国产成人精品日本-a级毛片无码免费真人-a级毛片毛片免费观看久潮喷

更多QQ空间微信QQ好友腾讯朋友复制链接
您的位置:首頁/技術文章
文章詳情頁

Nginx中include的具體用法

【字号: 作者:豬豬瀏覽:3日期:2023-08-20 20:22:35

include可以用在任何地方,前提是include的文件自身語法正確。include文件路徑可以是絕對路徑,也可以是相對路徑,相對路徑以nginx.conf為基準,同時可以使用通配符。

配置實例

# 絕對路徑include /etc/conf/nginx.conf# 相對路徑include port/80.conf# 通配符include *.conf

測試配置文件

> ./nginx -t

主模式配置

user wwwt; # 服務器使用用戶worker_processes 1; # 配置 worker 進程啟動的數量,建議配置為 CPU 核心數#error_log logs/error.log; # 全局錯誤日志pid /etc/nginx/logs/nginx.pid; # 設置記錄主進程 ID 的文件events { # 單個后臺 worker process 進程的最大并發鏈接數 # 并發總數 max_clients = worker_professes * worker_connections worker_connections 4096; ## Defaule: 1024 # multi_accept on; ## 指明 worker 進程立刻接受新的連接}# 主模式http { include mime.types; default_type application/octet-stream; #log_format main '$remote_addr - $remote_user [$time_local] '$request' ' # '$status $body_bytes_sent '$http_referer' ' # ''$http_user_agent' '$http_x_forwarded_for''; #access_log logs/access.log main; sendfileon; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; # 重點,分文件放置路徑 include /etc/nginx/cs/*.conf; #gzip on server {# the port your site will be served onlisten 80;# the domain name it will serve forcharset utf-8;# max upload sizeclient_max_body_size 75M; # adjust to taste# Finally, send all non-media requests to the Django server.location / {} }}

分文件

server { # the port your site will be served on listen 443; # the domain name it will serve for server_name cs.oyz.cn; # substitute your machine's IP address or FQDN charset utf-8; ssl on; ssl_certificate cert/*****.pem; ssl_certificate_key cert/*****.key; # max upload size client_max_body_size 75M; # adjust to taste # Django media location /media {alias ********; # your Django project's media files - amend as required } location /static {alias ********; # your Django project's static files - amend as required } location / {uwsgi_param UWSGI_SCHEME https;uwsgi_pass 127.0.0.1:9002;uwsgi_send_timeout 3600s;# 指定向uWSGI傳送請求的超時時間,完成握手后向 uWSGI傳送請求的超時時間。uwsgi_connect_timeout 3600s; # 指定連接到后端uWSGI的超時時間。uwsgi_read_timeout 3600s;# 指定接收uWSGI應答的超時時間,完成握手后接收uWSGI應答的超時時間。include /etc/nginx/uwsgi_params; # the uwsgi_params file you installed }}

到此這篇關于Nginx中include的具體用法的文章就介紹到這了,更多相關Nginx include內容請搜索好吧啦網以前的文章或繼續瀏覽下面的相關文章希望大家以后多多支持好吧啦網!

標簽: Nginx
相關文章:
主站蜘蛛池模板: 日本亚欧乱色视频在线观看 | 欧美a免费| 色爱综合网 | 男女乱淫视频 | 在线观看免费视频国产 | 视频一区二区三区在线 | 欧美ppp| 99久久精品免费看国产高清 | 在线播放国产一区二区三区 | 国产九九在线观看播放 | 99精品高清不卡在线观看 | 暖暖免费高清日本一区二区三区 | 日韩专区在线 | 亚洲午夜成激人情在线影院 | 三级毛片在线播放 | 91亚洲成人 | 99精品免费在线观看 | 欧美视频自拍偷拍 | 欧美一级毛片免费高清aa | 综合在线视频精品专区 | 亚洲欧美日韩精品高清 | 欧美一级aⅴ毛片 | 日本又黄又爽又免费 | 999久久| 久久视屏这里只有精品6国产 | 亚洲天堂一区二区在线观看 | 欧美成人免费高清网站 | 毛片在线播放网站 | 国产在线乱子伦一区二区 | 美女图片1314mm爽爽爽 | 岬奈一区二区中文字幕 | 亚州一级毛片在线 | 最新国产一区二区精品久久 | 色老头老太做爰视频在线观看 | 俺来也俺来也天天夜夜视频 | 国产大片线上免费观看 | 免费欧洲毛片a级视频 | 日韩午夜免费视频 | 国产三及 | 2020精品极品国产色在线观看 | 欧美精选欧美极品 |