Я видел эту общую проблему, обсуждаемую здесь ранее, и попробовал все, но ни один не работает меня. как Не удалось запустить HTTP-сервер Apache и https://superuser.com/questions/1522288/failed-to-start-the-apache-http-server
ПОПЫТКА
Не знаю, что еще посмотреть
apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Fri 2020-07-10 11:09:56 +07; 12min ago
៧ 10 11:09:56 moniroth-ThinkPad-T450s systemd[1]: Starting The Apache HTTP Server...
៧ 10 11:09:56 moniroth-ThinkPad-T450s apachectl[969]: apache2: Syntax error on line 225 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/sites-enable
៧ 10 11:09:56 moniroth-ThinkPad-T450s apachectl[969]: Action 'start' failed.
៧ 10 11:09:56 moniroth-ThinkPad-T450s apachectl[969]: The Apache error log may have more information.
៧ 10 11:09:56 moniroth-ThinkPad-T450s systemd[1]: apache2.service: Control process exited, code=exited status=1
៧ 10 11:09:56 moniroth-ThinkPad-T450s systemd[1]: apache2.service: Failed with result 'exit-code'.
៧ 10 11:09:56 moniroth-ThinkPad-T450s systemd[1]: Failed to start The Apache HTTP Server.
. РЕДАКТИРОВАТЬ: После запуска команды apachectl configtest
я получил это сообщение
apache2: Syntax error on line 225 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/sites-enabled/your_domain.com.conf: /etc/apache2/sites-enabled/your_domain.com.conf:1: <VirtualHost> was not closed. Action 'configtest' failed. The Apache error log may have more information.
, и вот что у меня есть в your_domain.com.conf file
<VirtualHost *:80>
ServerAdmin admin@opencart.com
DocumentRoot /var/www/html/opencart/
ServerName opentcart.com ServerAlias www.opencart.com <Directory /var/www/html/opencart/> Options FollowSymlinks AllowOverride All Order allow,deny allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>
Конфигурационный файл virtualhost требует доработки
Из
<VirtualHost *:80>
ServerAdmin admin@opencart.com
DocumentRoot /var/www/html/opencart/
ServerName opentcart.com ServerAlias www.opencart.com <Directory /var/www/html/opencart/> Options FollowSymlinks AllowOverride All Order allow,deny allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>
В
<VirtualHost *:80>
ServerAdmin admin@opencart.com
DocumentRoot /var/www/html/opencart/
ServerName opentcart.com
ServerAlias www.opencart.com
<Directory /var/www/html/opencart/>
Options FollowSymlinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>