Pages : 1
#1 Le 25/02/2017, à 11:30
- pol2095
Apache virtualHost 443 ne fonctionne pas
Bonjour,
j'ai installé un serveur Apache, j'ai voulu rajouter un virtualHost pour le port 443 dans "/etc/apache2/sites-enabled/000-defaultSSL.conf" :
<VirtualHost *:443>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
SSLEngine On
SSLCertificateFile /etc/letsencrypt/live/monsite.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/monsite.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
mais Apache refuse de démarrer
[....] 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!
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Sat 2017-02-25 10:20:57 UTC; 1min 0s ago
Docs: man:systemd-sysv-generator(8)
Process: 7496 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
Process: 7521 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
Feb 25 10:20:57 ubuntu apache2[7521]: *
Feb 25 10:20:57 ubuntu apache2[7521]: * The apache2 configtest failed.
Feb 25 10:20:57 ubuntu apache2[7521]: Output of config test was:
Feb 25 10:20:57 ubuntu apache2[7521]: apache2: Syntax error on line 223 of /etc/apache2/apache2.conf: Syntax error on line 33 of /etc/apa
Feb 25 10:20:57 ubuntu apache2[7521]: Action 'configtest' failed.
Feb 25 10:20:57 ubuntu apache2[7521]: The Apache error log may have more information.
Feb 25 10:20:57 ubuntu systemd[1]: apache2.service: Control process exited, code=exited status=1
Feb 25 10:20:57 ubuntu systemd[1]: Failed to start LSB: Apache2 web server.
Feb 25 10:20:57 ubuntu systemd[1]: apache2.service: Unit entered failed state.
Feb 25 10:20:57 ubuntu systemd[1]: apache2.service: Failed with result 'exit-code'.
Merci
Modération : merci à l'avenir d'utiliser les balises code (explications ici).
Dernière modification par cqfd93 (Le 25/02/2017, à 11:56)
Hors ligne
#2 Le 26/02/2017, à 17:25
- bobe
Re : Apache virtualHost 443 ne fonctionne pas
Feb 25 10:20:57 ubuntu apache2[7521]: apache2: Syntax error on line 223 of /etc/apache2/apache2.conf: Syntax error on line 33 of /etc/apa
Y a quoi à la ligne 33 ?
As-tu activé le module ssl ?
a2enmod ssl
Hors ligne
#3 Le 26/02/2017, à 19:28
- pol2095
Re : Apache virtualHost 443 ne fonctionne pas
c'est bon j'ai trouvé la réponse.
sudo a2enmod ssl
sudo a2ensite default-ssl
Par contre je voudrais installer Apache 2.2 en parallèle sur Ubuntu 16-04 LTS pour faire un test sur un module qui ne marche pas, est-ce possible ?
Dernière modification par pol2095 (Le 26/02/2017, à 19:37)
Hors ligne
Pages : 1