درود به دوستان و اساتید
میشه دوستان راهنمایی کنن چرا این دو سرویس بالا نمیان؟
httpd , nginx
نمایش نسخه قابل چاپ
درود به دوستان و اساتید
میشه دوستان راهنمایی کنن چرا این دو سرویس بالا نمیان؟
httpd , nginx
این دستورات رو بزنید خروجی ها رو ببینید چه خطایی نمایش میدن:
کد:systemctl restart httpd
systemctl status httpd
systemctl restart nginx
systemctl status nginx
nginx -t
درود به شما
به ترتیب دستوراتی که دادید:
[root@server ~]# systemctl restart httpd
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
[root@server ~]# systemctl status httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/etc/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2020-10-14 13:10:06 +0330; 9s ago
Process: 27864 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 27864 (code=exited, status=1/FAILURE)
Status: "Reading configuration..."
Oct 14 13:10:06 server.makoranhost.net systemd[1]: Starting The Apache HTTP S...
Oct 14 13:10:06 server.makoranhost.net httpd[27864]: AH00526: Syntax error on...
Oct 14 13:10:06 server.makoranhost.net httpd[27864]: SSLCertificateFile: file...
Oct 14 13:10:06 server.makoranhost.net systemd[1]: httpd.service: main proces...
Oct 14 13:10:06 server.makoranhost.net systemd[1]: Failed to start The Apache...
Oct 14 13:10:06 server.makoranhost.net systemd[1]: Unit httpd.service entered...
Oct 14 13:10:06 server.makoranhost.net systemd[1]: httpd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
[root@server ~]# systemctl restart nginx
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
[root@server ~]# systemctl status nginx
● nginx.service - The nginx HTTP and reverse proxy server
Loaded: loaded (/etc/systemd/system/nginx.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2020-10-14 13:11:12 +0330; 329ms ago
Process: 28122 ExecStartPre=/usr/sbin/nginx -t -c /etc/nginx/nginx.conf (code=exited, status=1/FAILURE)
Oct 14 13:11:12 server.makoranhost.net systemd[1]: Starting The nginx HTTP an...
Oct 14 13:11:12 server.makoranhost.net nginx[28122]: nginx: [emerg] unknown d...
Oct 14 13:11:12 server.makoranhost.net nginx[28122]: nginx: configuration fil...
Oct 14 13:11:12 server.makoranhost.net systemd[1]: nginx.service: control pro...
Oct 14 13:11:12 server.makoranhost.net systemd[1]: Failed to start The nginx ...
Oct 14 13:11:12 server.makoranhost.net systemd[1]: Unit nginx.service entered...
Oct 14 13:11:12 server.makoranhost.net systemd[1]: nginx.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
[root@server ~]# nginx -t
nginx: [emerg] unknown directive "ServerAlias" in /usr/local/directadmin/data/users/rcpahreh/nginx.conf:14
nginx: configuration file /etc/nginx/nginx.conf test failed
سلام
البته برای خوانایی بیشتر بهتر هست که کد ها رو داخل تگ کد قرار بدید مثل من که نوشتم.
اما در خصوص مشکل تون، برای آپاچی این کامند رو بزنید و خروجی رو بفرمایید:
و برای nginx هم فایل /etc/nginx/nginx.conf رو باز کنید و خط ۱۴ رو چک کنید.کد:journalctl -xe | grep httpd
کد HTML:[root@server ~]# journalctl -xe | grep httpd
-- Subject: Unit httpd.service has begun start-up
-- Unit httpd.service has begun starting up.
Oct 14 13:49:51 server.makoranhost.net httpd[9207]: AH00526: Syntax error on line 62 of /usr/local/directadmin/data/users/admin/httpd.conf:
Oct 14 13:49:51 server.makoranhost.net httpd[9207]: SSLCertificateFile: file '/usr/local/directadmin/data/users/admin/domains/makoranhost.net.cert' does not exist or is empty
Oct 14 13:49:51 server.makoranhost.net systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
-- Subject: Unit httpd.service has failed
-- Unit httpd.service has failed.
Oct 14 13:49:51 server.makoranhost.net systemd[1]: Unit httpd.service entered failed state.
Oct 14 13:49:51 server.makoranhost.net systemd[1]: httpd.service failed.
Oct 14 13:50:01 server.makoranhost.net systemd[1]: Unit httpd.service cannot be reloaded because it is inactive.
-- Subject: Unit httpd.service has begun start-up
-- Unit httpd.service has begun starting up.
Oct 14 13:50:02 server.makoranhost.net httpd[10383]: AH00526: Syntax error on line 62 of /usr/local/directadmin/data/users/admin/httpd.conf:
Oct 14 13:50:02 server.makoranhost.net httpd[10383]: SSLCertificateFile: file '/usr/local/directadmin/data/users/admin/domains/makoranhost.net.cert' does not exist or is empty
Oct 14 13:50:02 server.makoranhost.net systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
-- Subject: Unit httpd.service has failed
-- Unit httpd.service has failed.
Oct 14 13:50:02 server.makoranhost.net systemd[1]: Unit httpd.service entered failed state.
Oct 14 13:50:02 server.makoranhost.net systemd[1]: httpd.service failed.
-- Subject: Unit httpd.service has begun start-up
-- Unit httpd.service has begun starting up.
Oct 14 13:50:02 server.makoranhost.net httpd[10485]: AH00526: Syntax error on line 62 of /usr/local/directadmin/data/users/admin/httpd.conf:
Oct 14 13:50:02 server.makoranhost.net httpd[10485]: SSLCertificateFile: file '/usr/local/directadmin/data/users/admin/domains/makoranhost.net.cert' does not exist or is empty
Oct 14 13:50:02 server.makoranhost.net systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
-- Subject: Unit httpd.service has failed
-- Unit httpd.service has failed.
Oct 14 13:50:02 server.makoranhost.net systemd[1]: Unit httpd.service entered failed state.
Oct 14 13:50:02 server.makoranhost.net systemd[1]: httpd.service failed.
-- Subject: Unit httpd.service has begun start-up
-- Unit httpd.service has begun starting up.
Oct 14 13:50:07 server.makoranhost.net httpd[11832]: AH00526: Syntax error on line 62 of /usr/local/directadmin/data/users/admin/httpd.conf:
Oct 14 13:50:07 server.makoranhost.net httpd[11832]: SSLCertificateFile: file '/usr/local/directadmin/data/users/admin/domains/makoranhost.net.cert' does not exist or is empty
Oct 14 13:50:07 server.makoranhost.net systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
-- Subject: Unit httpd.service has failed
-- Unit httpd.service has failed.
Oct 14 13:50:07 server.makoranhost.net systemd[1]: Unit httpd.service entered failed state.
Oct 14 13:50:07 server.makoranhost.net systemd[1]: httpd.service failed.
-- Subject: Unit httpd.service has begun start-up
-- Unit httpd.service has begun starting up.
Oct 14 13:50:46 server.makoranhost.net httpd[16060]: AH00526: Syntax error on line 62 of /usr/local/directadmin/data/users/admin/httpd.conf:
Oct 14 13:50:46 server.makoranhost.net httpd[16060]: SSLCertificateFile: file '/usr/local/directadmin/data/users/admin/domains/makoranhost.net.cert' does not exist or is empty
Oct 14 13:50:46 server.makoranhost.net systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
-- Subject: Unit httpd.service has failed
-- Unit httpd.service has failed.
Oct 14 13:50:46 server.makoranhost.net systemd[1]: Unit httpd.service entered failed state.
Oct 14 13:50:46 server.makoranhost.net systemd[1]: httpd.service failed.
Oct 14 13:51:01 server.makoranhost.net systemd[1]: Unit httpd.service cannot be reloaded because it is inactive.
-- Subject: Unit httpd.service has begun start-up
-- Unit httpd.service has begun starting up.
Oct 14 13:51:01 server.makoranhost.net httpd[17647]: AH00526: Syntax error on line 62 of /usr/local/directadmin/data/users/admin/httpd.conf:
Oct 14 13:51:01 server.makoranhost.net httpd[17647]: SSLCertificateFile: file '/usr/local/directadmin/data/users/admin/domains/makoranhost.net.cert' does not exist or is empty
Oct 14 13:51:01 server.makoranhost.net systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
-- Subject: Unit httpd.service has failed
-- Unit httpd.service has failed.
Oct 14 13:51:01 server.makoranhost.net systemd[1]: Unit httpd.service entered failed state.
Oct 14 13:51:01 server.makoranhost.net systemd[1]: httpd.service failed.
-- Subject: Unit httpd.service has begun start-up
-- Unit httpd.service has begun starting up.
Oct 14 13:51:02 server.makoranhost.net httpd[17687]: AH00526: Syntax error on line 62 of /usr/local/directadmin/data/users/admin/httpd.conf:
Oct 14 13:51:02 server.makoranhost.net httpd[17687]: SSLCertificateFile: file '/usr/local/directadmin/data/users/admin/domains/makoranhost.net.cert' does not exist or is empty
Oct 14 13:51:02 server.makoranhost.net systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
-- Subject: Unit httpd.service has failed
-- Unit httpd.service has failed.
Oct 14 13:51:02 server.makoranhost.net systemd[1]: Unit httpd.service entered failed state.
Oct 14 13:51:02 server.makoranhost.net systemd[1]: httpd.service failed.
-- Subject: Unit httpd.service has begun start-up
-- Unit httpd.service has begun starting up.
Oct 14 13:51:07 server.makoranhost.net httpd[17696]: AH00526: Syntax error on line 62 of /usr/local/directadmin/data/users/admin/httpd.conf:
Oct 14 13:51:07 server.makoranhost.net httpd[17696]: SSLCertificateFile: file '/usr/local/directadmin/data/users/admin/domains/makoranhost.net.cert' does not exist or is empty
Oct 14 13:51:07 server.makoranhost.net systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
-- Subject: Unit httpd.service has failed
-- Unit httpd.service has failed.
Oct 14 13:51:07 server.makoranhost.net systemd[1]: Unit httpd.service entered failed state.
Oct 14 13:51:07 server.makoranhost.net systemd[1]: httpd.service failed.
-- Subject: Unit httpd.service has begun start-up
-- Unit httpd.service has begun starting up.
Oct 14 13:52:01 server.makoranhost.net httpd[17851]: AH00526: Syntax error on line 62 of /usr/local/directadmin/data/users/admin/httpd.conf:
Oct 14 13:52:01 server.makoranhost.net httpd[17851]: SSLCertificateFile: file '/usr/local/directadmin/data/users/admin/domains/makoranhost.net.cert' does not exist or is empty
Oct 14 13:52:01 server.makoranhost.net systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
-- Subject: Unit httpd.service has failed
-- Unit httpd.service has failed.
Oct 14 13:52:01 server.makoranhost.net systemd[1]: Unit httpd.service entered failed state.
Oct 14 13:52:01 server.makoranhost.net systemd[1]: httpd.service failed.
-- Subject: Unit httpd.service has begun start-up
-- Unit httpd.service has begun starting up.
Oct 14 13:52:06 server.makoranhost.net httpd[17879]: AH00526: Syntax error on line 62 of /usr/local/directadmin/data/users/admin/httpd.conf:
Oct 14 13:52:06 server.makoranhost.net httpd[17879]: SSLCertificateFile: file '/usr/local/directadmin/data/users/admin/domains/makoranhost.net.cert' does not exist or is empty
Oct 14 13:52:06 server.makoranhost.net systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
-- Subject: Unit httpd.service has failed
-- Unit httpd.service has failed.
Oct 14 13:52:06 server.makoranhost.net systemd[1]: Unit httpd.service entered failed state.
Oct 14 13:52:06 server.makoranhost.net systemd[1]: httpd.service failed.
-- Subject: Unit httpd.service has begun start-up
-- Unit httpd.service has begun starting up.
Oct 14 13:53:02 server.makoranhost.net httpd[18043]: AH00526: Syntax error on line 62 of /usr/local/directadmin/data/users/admin/httpd.conf:
Oct 14 13:53:02 server.makoranhost.net httpd[18043]: SSLCertificateFile: file '/usr/local/directadmin/data/users/admin/domains/makoranhost.net.cert' does not exist or is empty
Oct 14 13:53:02 server.makoranhost.net systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
-- Subject: Unit httpd.service has failed
-- Unit httpd.service has failed.
Oct 14 13:53:02 server.makoranhost.net systemd[1]: Unit httpd.service entered failed state.
Oct 14 13:53:02 server.makoranhost.net systemd[1]: httpd.service failed.
-- Subject: Unit httpd.service has begun start-up
-- Unit httpd.service has begun starting up.
Oct 14 13:53:07 server.makoranhost.net httpd[18069]: AH00526: Syntax error on line 62 of /usr/local/directadmin/data/users/admin/httpd.conf:
Oct 14 13:53:07 server.makoranhost.net httpd[18069]: SSLCertificateFile: file '/usr/local/directadmin/data/users/admin/domains/makoranhost.net.cert' does not exist or is empty
Oct 14 13:53:07 server.makoranhost.net systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
-- Subject: Unit httpd.service has failed
-- Unit httpd.service has failed.
Oct 14 13:53:07 server.makoranhost.net systemd[1]: Unit httpd.service entered failed state.
Oct 14 13:53:07 server.makoranhost.net systemd[1]: httpd.service failed.
=================
برای nginx نتونستم این پاسخ رو داد
[root@server ~]# /etc/nginx/nginx.conf
-bash: /etc/nginx/nginx.conf: Permission denied
درود بر شما
اگر شخصی سازی روی وب سرور انجام ندادید و منابع آزاد هم وجود داره میتونید همه چیز مرتبط با وب سرور رو از نو build کنید:
موفق و پیروز باشید.کد:cd /usr/local/directadmin/custombuild
./build update
./build update_da
./build set webserver nginx_apache
./build nginx_apache
./build rewrite_confs