LNMP

 

1.1.1 建立www用户

useradd -s /sbin/nologin -M wwwhtml

 

1.1.2 编译安装(三部曲)

./configure --prefix=/application/nginx-1.10.2 --user=www --group=www --with-http_stub_status_module  --with-http_ssl_modulenginx

make  && make  installvim

 

1.1.3 建立软连接

ln  -s  /application/nginx-1.10.2  /application/nginxapp

 

1.1.4 修改配置文件

vim /application/nginx/conf/nginx.conf测试

server {server

     listen       80;htm

     server_name  blog.xzy.org;blog

     location / {ssl

         root   html;it

         index  index.html index.htm;

     }

 

1.1.5 启动相关(启动、关闭、重启)

检查配置文件

/application/nginx/sbin/nginx -t

启动

/application/nginx/sbin/nginx

平滑重启、关闭

/application/nginx/sbin/nginx -s  reload | stop

 

 

1.2 测试

相关文章
相关标签/搜索