【问题标题】:Unable to change the document root of https://localhost/无法更改 https://localhost/ 的文档根目录
【发布时间】:2017-06-07 03:31:20
【问题描述】:

我去了/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/"

【问题讨论】:

    标签: php apache ubuntu ssl


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-07-12
      • 2012-04-26
      • 1970-01-01
      • 2016-06-21
      • 2017-06-25
      • 2019-03-23
      相关资源
      最近更新 更多