Php 无法更改的文档根目录https://localhost/
我转到Php 无法更改的文档根目录https://localhost/,php,apache,ubuntu,ssl,Php,Apache,Ubuntu,Ssl,我转到/etc/apache2/sites available/default ssl,并在访问ssl时更新了文档根目录。然而,出于某种原因,它仍然指向/var/www。我已经使用sudo-service-apache2-reload和sudo-service-apache2-restart重新加载并重新启动了apache2服务器,但更改仍然没有反映出来。是否有其他地方需要更改以制作https://localhost/指向/home/student/public\u html 默认ssl的前几行
/etc/apache2/sites available/default ssl
,并在访问ssl时更新了文档根目录。然而,出于某种原因,它仍然指向/var/www
。我已经使用sudo-service-apache2-reload
和sudo-service-apache2-restart
重新加载并重新启动了apache2服务器,但更改仍然没有反映出来。是否有其他地方需要更改以制作https://localhost/
指向/home/student/public\u html
默认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>
服务器管理员temp@temp.com
服务器名本地主机
DocumentRoot/home/student/public\u html
选项如下符号链接
不允许超限
选项索引跟随符号链接多视图
不允许超限
命令允许,拒绝
通融
默认设置的前几行:
<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/"
服务器管理员webmaster@localhost
DocumentRoot/home/student/public\u html
选项如下符号链接
不允许超限
选项索引跟随符号链接多视图
允许超越所有
命令允许,拒绝
通融
重定向“/”https://localhost/"
我删除了所有浏览器历史记录,它现在开始工作。:)