首页 > 其他 > 详细

鸡蛋学运维-6:nginx服务安装配置

时间:2017-10-13 14:51:08      阅读:225      评论:0      收藏:0      [点我收藏+]

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

鸡蛋学运维-6:nginx服务安装配置

原文:http://78124107.blog.51cto.com/5557978/1972010

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!