LINUX.ORG.RU

Не запускается второй сайт локально по HTTPS на Debian 9.

 ,


0

1

Приветствую! Не могу понять, в чем дело. Настроил SSL: - в /etc/apache2/ssl создал сертификаты cert.key и cert.pem; - конфиг сайта (/etc/apache2/sites-available.site1.local.conf):

<VirtualHost *:443>
ServerAdmin webmaster@site1.local
ServerName site.local
DirectoryIndex index.php index.html
DocumentRoot /var/www/site1.local/public
SSLEngine on
SSLCertificateFile ssl/cert.pem
SSLCertificateKeyFile ssl/cert.key
LogLevel warn
ErrorLog /var/www/site1.local/log/error.log
CustomLog /var/www/site1.local/log/access.log combined
</VirtualHost>

<VirtualHost *:80>
ServerName site1.local
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</VirtualHost>
Все отлично, по https://site1.local открывается нормально. Точно также настраиваю 2-й сайт, при ребуте апача, пишет ошибку. Что может быть не так?



Последнее исправление: ctyz2068 (всего исправлений: 2)

Ответ на: комментарий от TeopeTuK

/etc/init.d/apache2 restart [....] Restarting apache2 (via systemctl): apache2.serviceJob for apache2.service failed because the control process exited with error code. See «systemctl status apache2.service» and «journalctl -xe» for details. failed!

ctyz2068
() автор топика
Ответ на: комментарий от anonymous
Янв 21 10:28:07 web-group systemd[1]: Starting The Apache HTTP Server...
Янв 21 10:28:07 web-group apachectl[5482]: AH00526: Syntax error on line 7 of /etc/apache2/sites-enabled/site2.local.conf:
Янв 21 10:28:07 web-group apachectl[5482]: Invalid command 'xSSLCertificateFile', perhaps misspelled or defined by a module not included in the server configuration
Янв 21 10:28:07 web-group apachectl[5482]: Action 'start' failed.
Янв 21 10:28:07 web-group apachectl[5482]: The Apache error log may have more information.
Янв 21 10:28:07 web-group systemd[1]: apache2.service: Control process exited, code=exited status=1
Янв 21 10:28:07 web-group systemd[1]: Failed to start The Apache HTTP Server.
Янв 21 10:28:07 web-group systemd[1]: apache2.service: Unit entered failed state.
Янв 21 10:28:07 web-group systemd[1]: apache2.service: Failed with result 'exit-code'.

Говорит, синтаксическая ошибка в 7-й строке, но там:

xSSLCertificateFile ssl/cert.pem

ctyz2068
() автор топика
Ответ на: комментарий от ctyz2068

упс! откуда взялся x? Спасибо, все решилось!

ctyz2068
() автор топика
Ответ на: комментарий от TeopeTuK

Благодарю! Ничего не попишешь - понедельник))

ctyz2068
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.