nginx虛擬主機配置優化
優化
[[email protected] conf]# mkdir extra [[email protected] conf]# vim nginx.conf
[[email protected] conf]# cat nginx.conf worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; include extra/www.conf; include extra/bbs.conf; include extra/blog.conf; }
[[email protected] conf]# cp nginx.conf.20170820 extra/a [[email protected] conf]# cd extra/
[[email protected] extra]# sed -n "18,25p" a server { listen 80; server_name bbs.etiantian.org; location / { root html/bbs; index index.html index.htm; } } [[email protected]
[[email protected] extra]# sed -n "10,17p" a server { listen 80; server_name www.etiantian.org; location / { root html/www; index index.html index.htm; } }
[[email protected]