日志輸出(瀏覽器直接訪問)
缺省安裝下,瀏覽器是無法訪問日志的,需要在編譯的時候附帶參數安裝這些模塊
./configure --prefix=/usr/local/nginx --with-http_stub_status_module
然后再配置一下訪問地址
location /status { stub_status on; access_log /usr/local/nginx/logs/access.log; auth_basic "NginxStatus"; }
然后瀏覽器里輸入即可訪問
http://www.dshvv.com:8081/status
ssl報錯
如果涉及到一下報錯
nginx https protocol requires SSL support in
說明你用到了ssl,比如https等,那么編譯安裝的時候加如下模塊
./configure --prefix=/usr/local/nginx --with-http_ssl_module
備注
以上命令執行完后,再執行一下
make make install
然后重啟nginx即可