av一区二区在线观看_亚洲男人的天堂网站_日韩亚洲视频_在线成人免费_欧美日韩精品免费观看视频_久草视

您的位置:首頁技術(shù)文章
文章詳情頁

Nginx中include的具體用法

瀏覽:2日期:2023-08-20 20:22:35

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

配置實例

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

測試配置文件

> ./nginx -t

主模式配置

user wwwt; # 服務(wù)器使用用戶worker_processes 1; # 配置 worker 進(jìn)程啟動的數(shù)量,建議配置為 CPU 核心數(shù)#error_log logs/error.log; # 全局錯誤日志pid /etc/nginx/logs/nginx.pid; # 設(shè)置記錄主進(jìn)程 ID 的文件events { # 單個后臺 worker process 進(jìn)程的最大并發(fā)鏈接數(shù) # 并發(fā)總數(shù) max_clients = worker_professes * worker_connections worker_connections 4096; ## Defaule: 1024 # multi_accept on; ## 指明 worker 進(jìn)程立刻接受新的連接}# 主模式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應(yīng)答的超時時間,完成握手后接收uWSGI應(yīng)答的超時時間。include /etc/nginx/uwsgi_params; # the uwsgi_params file you installed }}

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

標(biāo)簽: Nginx
相關(guān)文章:
主站蜘蛛池模板: 欧美一页 | 精品国产一区二区国模嫣然 | 九色.com| 国产精品久久久亚洲 | 久久免费视频1 | 一区二区三区回区在观看免费视频 | 精品在线一区 | 亚洲日日夜夜 | 区一区二区三在线观看 | 午夜免费观看体验区 | av在线天堂 | av日韩高清 | 国产精品无码专区在线观看 | 在线一区二区三区 | 国产精品不卡 | 91精品国产色综合久久不卡蜜臀 | 欧美福利在线 | 国产中文 | 亚洲精品女优 | 久久成人18免费网站 | 成人在线视频免费播放 | 亚洲精品在线播放 | 欧美一区二区三区在线视频 | 高清黄色 | 97成人精品 | 精品久久久久一区二区国产 | 亚洲精品91 | 免费视频久久 | 天天干b| 18gay男同69亚洲网站 | 免费久久精品视频 | 97精品视频在线 | 免费人成在线观看网站 | 久久黄色精品视频 | 欧美二区在线 | 精品国产一区一区二区三亚瑟 | 中文字幕精品视频 | 伊人最新网址 | 国产亚洲精品一区二区三区 | 羞羞色视频| 国产一区二区在线视频 |