国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

nginx無法啟動

這篇具有很好參考價值的文章主要介紹了nginx無法啟動。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

1.背景及描述

當(dāng)我使用systemctl start nginx.service或者service nginx start命令啟動nginx,發(fā)現(xiàn)啟動失敗.當(dāng)使用nginx -t卻顯示OK.查看狀態(tài),信息如下:

情況1:

[root@CentOS-7-x86_64-DVD-2207-bt /]# nginx -t
nginx: the configuration file /www/server/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /www/server/nginx/conf/nginx.conf test is successful
[root@CentOS-7-x86_64-DVD-2207-bt /]# systemctl status nginx.service
● nginx.service - (null)
   Loaded: loaded (/etc/rc.d/init.d/nginx; bad; vendor preset: disabled)
   Active: failed (Result: exit-code) since 日 2023-03-05 13:22:07 CST; 58min ago
     Docs: man:systemd-sysv-generator(8)

3月 05 13:22:07 CentOS-7-x86_64-DVD-2207-bt systemd[1]: Starting (null)...
3月 05 13:22:07 CentOS-7-x86_64-DVD-2207-bt systemd[1]: nginx.service: control process exited, code=exited status=203
3月 05 13:22:07 CentOS-7-x86_64-DVD-2207-bt systemd[1]: Failed to start (null).
3月 05 13:22:07 CentOS-7-x86_64-DVD-2207-bt systemd[1]: Unit nginx.service entered failed state.
3月 05 13:22:07 CentOS-7-x86_64-DVD-2207-bt systemd[1]: nginx.service failed.

情況2:

[root@localhost logs]# systemctl status nginx.service
● nginx.service - SYSV: NGINX is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server
   Loaded: loaded (/etc/rc.d/init.d/nginx; bad; vendor preset: disabled)
   Active: failed (Result: exit-code) since 五 2020-10-16 10:52:10 CST; 11s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 38258 ExecStart=/etc/rc.d/init.d/nginx start (code=exited, status=203/EXEC)

10月 16 10:52:10 localhost.localdomain systemd[1]: Starting SYSV: NGINX is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server...
10月 16 10:52:10 localhost.localdomain systemd[1]: nginx.service: control process exited, code=exited status=203
10月 16 10:52:10 localhost.localdomain systemd[1]: Failed to start SYSV: NGINX is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server.
10月 16 10:52:10 localhost.localdomain systemd[1]: Unit nginx.service entered failed state.
10月 16 10:52:10 localhost.localdomain systemd[1]: nginx.service failed.
123456789101112

2.臨時解決方案

2.1 使用./nginx啟動

參考多篇博客均以失敗告終,最后偶然發(fā)現(xiàn),如果通過安裝目錄下sbin中的nginx可以正常啟動.命令如下:

#進入nginx安裝目錄下的sbin目錄,并指定配置文件啟動
./nginx -c /etc/local/nginx/conf/nginx.conf
12
2.2 殺掉./nginx啟動的進程,再使用service方式啟動

也有博客是這樣說的

只是很多時候我們都先用/usr/local/nginx/sbin/nginx來啟動了nginx

只要找到這個進程kill掉以后,再執(zhí)行/etc/rc.d/init.d/nginx start就一切正常了
123

即:先kill掉./nginx啟動的進程,然后再換成service nginx start方式啟動

3.總結(jié)

如果符合如下狀態(tài)

  • nginx -t顯示狀態(tài)ok

  • systemctl start nginx.service或者service nginx start命令啟動nginx失敗

  • 報錯信息為:nginx.service - SYSV: NGINX is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server

  • 報錯信息為:Process: 38258 ExecStart=/etc/rc.d/init.d/nginx start (code=exited, status=203/EXEC)

請嘗試:

  • 更改為./nginx -c /etc/local/nginx/conf/nginx.conf方式啟動

  • kill掉./nginx啟動的進程,然后再換成service nginx start方式啟動文章來源地址http://www.zghlxwxcb.cn/news/detail-456114.html

到了這里,關(guān)于nginx無法啟動的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實不符,請點擊違法舉報進行投訴反饋,一經(jīng)查實,立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費用

相關(guān)文章

  • nginx無法啟動

    1.背景及描述 當(dāng)我使用 systemctl start nginx.service 或者 service nginx start 命令啟動nginx,發(fā)現(xiàn)啟動失敗.當(dāng)使用 nginx -t 卻顯示OK.查看狀態(tài),信息如下: 情況1: 情況2: 2.臨時解決方案 2.1 使用./nginx啟動 參考多篇博客均以失敗告終,最后偶然發(fā)現(xiàn),如果通過安裝目錄下sbin中的nginx可以

    2024年02月06日
    瀏覽(15)
  • Linux中NGINX啟動但是無法訪問

    Linux中NGINX啟動但是無法訪問

    在Linux中已經(jīng)將NGINX啟動,但是 無法訪問 或者是訪問顯示 此網(wǎng)站無法提供安全連接 HTTPS/HTTP問題 有可能使用的是HTTPS訪問的所以造成顯示 此網(wǎng)站無法提供安全連接 如果改用 HTTP 訪問即可正常 將HTTPS,改成HTTP訪問即可,具體原因不詳 如果想使用HTTPS訪問需要ssl證書 還是無法訪

    2024年02月06日
    瀏覽(19)
  • Nginx安裝啟動后無法訪問(訪問拒絕連接)

    Nginx安裝啟動后無法訪問(訪問拒絕連接)

    安裝解壓Nginx后,啟動nginx.exe,瀏覽器訪問localhost卻訪問不到(我們知道Nginx默認(rèn)端口為80,可以直接localhost訪問),訪問卻顯示拒絕訪問無法連接。 在cmd窗口中我們來到Nginx解壓的根路徑輸入nginx -t檢查nginx配合是否有問題,如下顯示ok是沒問題的,但是之前報了錯誤 原因是因

    2024年02月10日
    瀏覽(19)
  • 【Nginx】啟動成功無法訪問網(wǎng)頁(完整的排除方案)

    ??【Nginx】啟動成功無法訪問網(wǎng)頁(完整的排除方案)_nginx啟動成功但是無法訪問_漸暖°的博客-CSDN博客 阿里云服務(wù)器 直接設(shè)置安全組—添加端口。?

    2024年02月07日
    瀏覽(16)
  • nginx無法啟動,任務(wù)管理器中找不到進程

    問題描述:在nginx官網(wǎng)下載壓縮包并解壓后,啟動nginx.exe? ,后臺會發(fā)生系統(tǒng)中斷,任務(wù)管理器中找不到nginx進程,且無端口占用. 解決方法:下載的nginx目錄中沒有l(wèi)ogs文件夾,新建logs文件夾并配置好文件目錄后,在error中發(fā)現(xiàn)錯誤: 2024/03/28 00:11:01 [emerg] 13648#4044: CreateDirectory() \\\"C:nginx/tem

    2024年04月28日
    瀏覽(96)
  • systemctl 命令設(shè)置開機自啟動失敗

    systemctl 命令設(shè)置開機自啟動失敗

    哈嘍大家好,我是咸魚。今天跟大家分享一個關(guān)于 Linux 服務(wù)(service)相關(guān)的案例 ? 我在 3 月 31日的時候發(fā)表了一篇《shell 腳本之一鍵部署安裝 Nginx》,介紹了如何通過 shell 腳本一鍵安裝 Nginx ? 我腳本中執(zhí)行了 Nginx 開機自啟動的命令,當(dāng)我使用 systemctl status nginx 命令復(fù)核的

    2023年04月10日
    瀏覽(20)
  • systemctl start jenkins啟動失敗

    參照官網(wǎng)安裝jenkins: https://pkg.jenkins.io/redhat-stable/ 安裝完成后通過 systemctl start jenkins 命令啟動, 失敗 使用提示的 systemctl status jenkins.service 命令查看詳細(xì)狀態(tài): 網(wǎng)上大多都說是jdk路徑問題和jdk版本不符。而我換了很多版本,路徑也加上了安裝路徑依然無法解決systemctl 啟動的問

    2024年01月20日
    瀏覽(25)
  • systemctl status mysqld.service或者systemctl start mysqld 啟動失敗的解決辦法

    systemctl status mysqld.service或者systemctl start mysqld 啟動失敗的解決辦法

    報錯過程: mysql需要啟動,執(zhí)行一下命令啟動mysql: 結(jié)果出現(xiàn)如下提示 在這里給大家一個提示,因為每個人的報錯原因不同,我們需要去查看mysql的日志 如果mysql日志太多,可以通過dG將mysql的日志全部刪除,之后再執(zhí)行啟動musql的命令 找到日志中出現(xiàn)error的地方,根據(jù)具體問

    2024年02月08日
    瀏覽(97)
  • `systemctl` 啟動單個服務(wù),其中包含多個進程

    要使用 systemctl 啟動單個服務(wù),其中包含多個進程,你可以使用 Systemd 的 template 機制。以下是使用 Systemd \\\'template\\\' 以創(chuàng)建一個可同時啟動多個進程的服務(wù)單元文件的過程: 為你的服務(wù)創(chuàng)建一個 template 服務(wù)單元文件。服務(wù)單元文件通常位于 /etc/systemd/system 目錄中。使用以下命令

    2024年02月06日
    瀏覽(32)
  • systemctl docker start 啟動失敗 解決辦法

    1.systemctl docker start 啟動失敗 yum 卸載重裝? ?無用 重啟虛擬機 無用 使用 systemctl status docker.service 查看結(jié)果 ● docker.service - Docker Application Container Engine ? ?Loaded: loaded (/etc/systemd/system/docker.service; disabled; vendor preset: disabled) ? ?Active: failed (Result: start-limit) since Sun 2022-11-13 03:01:3

    2024年02月04日
    瀏覽(38)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包