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 測試

相關文章
相關標籤/搜索