【发布时间】:2017-06-07 03:31:20
【问题描述】:
我去了/etc/apache2/sites-available/default-ssl 并在访问 ssl 时更新了文档根目录。但是,由于某种原因,它仍然指向/var/www。我已经使用sudo service apache2 reload 和sudo service apache2 restart 重新加载并重新启动了apache2 服务器,但这些更改仍然没有反映出来。我是否需要更改其他地方才能使https://localhost/ 指向/home/student/public_html?
default-ssl的前几行:
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
ServerAdmin temp@temp.com
ServerName localhost
DocumentRoot /home/student/public_html
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/student/public_html/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
默认的前几行:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /home/student/public_html
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/student/public_html/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
Redirect "/" "https://localhost/"
【问题讨论】: