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

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

nginx搭建文件服務(wù)器的詳細(xì)過程

瀏覽:8日期:2023-08-07 20:15:49
目錄安裝nginx搭建文件服務(wù)器1.改為root用戶2.加一個server①配置文件位置②html目錄③在原來的nginx.conf里加一個server配置3.啟動4.訪問界面5.完整的nginx配置參考安裝nginxyum -y install nginx搭建文件服務(wù)器1.改為root用戶

原來的nginx.conf里,第一行是

user ngix; # 不同版本的不一樣

改為

user root;2.加一個server①配置文件位置[root@VM_0_9_centos ~]# find / -name nginx.conf/var/opt/gitlab/nginx/conf/nginx.conf/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/unicorn-5.1.0/examples/nginx.conf/opt/gitlab/embedded/conf/nginx.conf /etc/nginx/nginx.conf # 這個是要找的文件②html目錄/usr/share/nginx/html # 默認(rèn)的③在原來的nginx.conf里加一個server配置

配置寫在http { } 里面,與其他server 同級別。

autoindex on;# 顯示目錄autoindex_exact_size on;# 顯示文件大小autoindex_localtime on;# 顯示文件時間server {listen 8080 default_server;listen [::]:8080 default_server;server_name _;#root /usr/share/nginx/html;root /data/;location / {}error_page 404 /404.html;location = /40x.html {}error_page 500 502 503 504 /50x.html;location = /50x.html {}}

參考:https://www.jb51.net/article/247578.htm

3.啟動service nginx startservice nginx stop service nginx restart # 重啟nginx -s reload # 修改配置后重啟,或者使用reload重載配置文件4.訪問界面

5.完整的nginx配置參考user root;worker_processes auto;error_log /var/log/nginx/error.log;pid /run/nginx.pid;# Load dynamic modules. See /usr/share/nginx/README.dynamic.include /usr/share/nginx/modules/*.conf;events { worker_connections 1024;}http { 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 /var/log/nginx/access.log main; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; include /etc/nginx/mime.types; default_typeapplication/octet-stream; # Load modular configuration files from the /etc/nginx/conf.d directory. # See http://nginx.org/en/docs/ngx_core_module.html#include # for more information. include /etc/nginx/conf.d/*.conf; server {listen 80 default_server;listen [::]:80 default_server;server_name _;root /usr/share/nginx/html;# Load configuration files for the default server block.include /etc/nginx/default.d/*.conf;include /etc/nginx/conf.d/*.conf;location / {}error_page 404 /404.html; location = /40x.html {}error_page 500 502 503 504 /50x.html; location = /50x.html {} }autoindex on;# 顯示目錄autoindex_exact_size on;# 顯示文件大小autoindex_localtime on;# 顯示文件時間server {listen 6868 default_server;listen [::]:6868 default_server;server_name _;#root /usr/share/nginx/html;root /;location / {}error_page 404 /404.html;location = /40x.html {}error_page 500 502 503 504 /50x.html;location = /50x.html {}}}

到此這篇關(guān)于nginx搭建文件服務(wù)器的文章就介紹到這了,更多相關(guān)nginx文件服務(wù)器內(nèi)容請搜索好吧啦網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持好吧啦網(wǎng)!

標(biāo)簽: Nginx
相關(guān)文章:
主站蜘蛛池模板: 成年人毛片网站 | 免费a级在线观看播放 | 永久免费精品视频 | 欧美日韩视频一区二区 | 99在线观看巨臀大臀视频 | 欧美很黄视频在线观看 | 成人精品一区二区久久 | 久久精品免观看国产成人 | 国产成人一区二区三区精品久久 | 天堂一区二区在线观看 | 久久久久久久国产精品视频 | www.亚洲在线| 色老汉丁香网 | 国产人成亚洲第一网站在线播放 | 欧美特黄一片aa大片免费看 | 九九精品免费 | 久久成年片色大黄全免费网站 | 拍拍拍又黄又爽无挡视频免费 | 亚洲综合99| 久久久久久久99精品免费 | 夜色www| 久久99国产精一区二区三区! | 中文字幕一区视频一线 | 免费成年人在线视频 | 成人免费大片a毛片 | 免费国产成人高清在线观看不卡 | 亚洲美女视频一区二区三区 | 美女叉开腿让男人捅 | 在线91精品国产免费 | 性色网址 | 久久这里只有精品免费播放 | 亚洲第一视频在线观看 | 男人v天堂 | 国产九九精品视频 | 自拍理论片 | 国产精品成人观看视频免费 | 一 级 黄 色 大片 | 久久久国产一区二区三区 | 成年人性网站 | 欧美色另类 | 另类专区另类专区亚洲 |