我有一个已在http中运行的网站。我想为整个网站启用https。
我按照this site
上的教程进行操作这是我的/etc/apache2/sites-available/default-ssl.conf文件
IfModule mod_ssl.c>
<VirtualHost _default_:443>
ServerAdmin webmaster@localhost
websitename websitename.com:443
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
现在,当我尝试重新启动apache时,我收到以下错误。
* Starting web server apache2 *
* The apache2 configtest failed.
Output of config test was:
AH00526: Syntax error on line 4 of /etc/apache2/sites-enabled/default-ssl.conf:
Invalid command 'websitename', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
The Apache error log may have more information.