第二步,編輯你需要添加404頁面的網(wǎng)站的conf文件,對(duì)應(yīng)在 usr/local/nginx/conf/vhost/XXXX.com.conf,在server區(qū)域添加代碼; 復(fù)制代碼 代碼如下: error_page 404 = /404.html; 第三步,重啟 LNMP; 復(fù)制代碼 代碼如下: /root/lnmp restart 總結(jié),我們可以通過 /usr/local/nginx/sbin/nginx -t 來測(cè)試返回狀態(tài)是否正確。 復(fù)制代碼 代碼如下: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok configuration file /usr/local/nginx/conf/nginx.conf test is successful 如果是上述返回狀態(tài),就是正確的。
新聞熱點(diǎn)
疑難解答
圖片精選
網(wǎng)友關(guān)注