我有一个已经在 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.
最佳答案
关于apache - 如何转换configure apache2来处理https,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29946524/