[英]How can I change the site file directory for an apache server? (Raspberry Pi)
現在它是'/ var / www / html',但我希望它是'/ home / pi / FTP'
我可能只是在配置文件中更改它,但我無法找到它,謝謝你提前。
您必須編輯apache2.conf和000-default.conf來更改apache的文檔根目錄。
Apache服務器安裝在var / www / html上。這是apache的默認根目錄。
更改Apache的根目錄或將項目移動到/ var / www / html。
要更改Apache的根目錄,請運行:
cd / etc / apache2 / sites-available
然后使用以下命令打開000-default.conf文件:
nano 000-default.conf
編輯DocumentRoot選項:
DocumentRoot /path/to/my/project
然后重啟apache服務器:
sudo service apache2 restart
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.