1. 程式人生 > >Apache伺服器預設訪問www路徑修改

Apache伺服器預設訪問www路徑修改

修改Apache伺服器地址對映

(1)資料夾:sites-available
建立 demo.conf

(2)資料夾:sites-enabled
建立 demo.conf
ln -s ./sites-aviabled/demo.conf demo.config

(3)編輯sites-enabled下demo.conf檔案

ServerName 指定伺服器域名

DocumentRoot 指定資料夾路徑

(4)Apache.conf增加配置

<Directory 指定資料夾路徑>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>