无法更改https:// localhost /的文档根目录

时间:2017-01-22 15:08:41

标签: php apache ubuntu ssl

我访问/etc/apache2/sites-available/default-ssl并在访问ssl时更新了文档根目录。但是,出于某种原因,它仍然指向/var/www。我使用sudo service apache2 reloadsudo 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/"

1 个答案:

答案 0 :(得分:0)

我删除了所有浏览器历史记录,现在就开始工作了。 :)