nginx 配置遇到的問題

2021-07-14 15:28:37 字數 417 閱讀 1733

當執行sudo service nginx restart後,出現如下情況:

於是便檢查nginx配置檔案的語法是否有問題,用 nginx -t -c 檢查,結果如下:

問題原因:設定的使用者和使用者組www並沒有在伺服器系統中新增

解決辦法有兩種:

1、在nginx.conf中設定成user nobody

2、新增使用者和使用者組:

#/usr/sbin/groupadd -f www

#/usr/sbin/useradd -g www www

若遇到502 bad getway訪問禁止的情況需要禁用selinux

sudo setenforce 0

Nginx安裝配置遇到的問題(一)

starting,stopping,and reloading configuration to start nginx,run the executable file.once nginx is started,it can be controlled by invoking the execut...

nginx遇到的配置的坑

坑1 302重定向跳轉問題 第一步以為要在nginx裡面配置,所以裝了more header 設定了proxy set header cookie http cookie more set headers location 302重定向沒問題了,但是出現了第二個請求404頁面,session也寫入了...

nginx配置遇到的一些問題

由於是nginx 所以不標準的tcp報文會被截掉一部分發不出去,所以加了一句 underscores in headers on 解決請求頭部分內容缺失問題 來自 user nobody worker processes 10 error log usr local nginx logs error...