无法更改https://localhost/的文档根目录 [英] Unable to change the document root of https://localhost/
问题描述
我去/etc/apache2/sites-available/default-ssl
并在访问ssl时更新了文档根目录.但是,由于某种原因,它仍然指向/var/www
.我已经使用 sudo service apache2 reload
和 sudo service apache2 restart
重新加载并重新启动了apache2服务器,但更改仍未反映出来.还有其他地方需要更改以使 https://localhost/
指向/home/student/public_html
吗?
I went to /etc/apache2/sites-available/default-ssl
and updated the document root when it is accessing ssl. However, for some reason, it's still pointing to /var/www
. I have reloaded and restarted apache2 server using sudo service apache2 reload
and sudo service apache2 restart
but the changes are still not reflecting. Are there other places that I need to change to make the https://localhost/
points to /home/student/public_html
?
default-ssl的前几行:
The first few lines of 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/"
推荐答案
我删除了所有浏览器历史记录,并且现在开始运行.:)
I deleted all browser history and it starts working now. :)
这篇关于无法更改https://localhost/的文档根目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!