我访问/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/"
答案 0 :(得分:0)
我删除了所有浏览器历史记录,现在就开始工作了。 :)