标签:nginx
nginx安装配置
1.安装-(web-lnmp-172.16.1.4)
2.
3.
4.
/application/nginx/sbin/nginx -t
/application/nginx/sbin/nginx -V
/application/nginx/sbin/nginx -s reload
vim /application/nginx/sbin/nginx/conf/nginx.conf
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
#nginx vhosts config
include extra/www.conf;
include extra/bbs.conf;
include extra/blog.conf;
include extra/status.conf;
}
cat >/application/nginx/conf/extra/www.conf<<EOF
server {
listen 80;
server_name www.etiantian.org;
location / {
root html/www;
index index.html index.htm;
}
}
EOF
cat >/application/nginx/conf/extra/bbs.conf<<EOF
server {
listen 80;
server_name bbs.etiantian.org;
location / {
root html/bbs;
index index.html index.htm;
}
}
EOF
cat >/application/nginx/conf/extra/blog.conf<<EOF
server {
listen 80;
server_name blog.etiantian.org;
location / {
root html/blog;
index index.html index.htm;
}
}
EOF
cat >/application/nginx/conf/extra/status.conf<<EOF
##STATUS
server {
listen 80;
server_name status.etiantian.org;
location / {
stub_status on;
access_log off;
}
}
EOF
本文出自 “有压力的鸡蛋” 博客,请务必保留此出处http://78124107.blog.51cto.com/5557978/1972010
标签:nginx
原文地址:http://78124107.blog.51cto.com/5557978/1972010