1. 打開nginx的配置文件,通常位于C:\nginx\conf\nginx.conf。
2. 找到以下配置:
```
error_log logs/error.log; access_log logs/access.log;
```
這個配置指定了錯誤日志和訪問日志的存放位置。默認情況下,它們都存放在logs目錄下。
3. 修改配置,將日志存放位置改為其他目錄。例如,將訪問日志存放在C:\nginx\logs\access.log文件中:
```文章源自網吧系統(tǒng)維護-http://www.ykday.cn/10573.html
error_log C:\nginx\logs\error.log; access_log C:\nginx\logs\access.log;
```
4. 保存文件并重新啟動nginx服務。
現(xiàn)在,nginx將記錄所有訪問日志到C:\nginx\logs\access.log文件中。文章源自網吧系統(tǒng)維護-http://www.ykday.cn/10573.html
文章源自網吧系統(tǒng)維護-http://www.ykday.cn/10573.html
版權聲明:文章圖片資源來源于網絡,如有侵權,請留言刪除!!!
評論