簡體   English   中英

無法更改https:// localhost /的文檔根目錄

[英]Unable to change the document root of https://localhost/

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

我刪除了所有瀏覽器歷史記錄,並且現在開始運行。 :)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM