解決 我知道這是這是回答很多次一個共同的問題,但我看了所有的答案,我都試一遍,仍然解決不了。 我想創建一個虛擬主機來解決使用include_once的路徑問題,我想要在我的xampp本地和我的虛擬主機(我是php和xampp的新手)中工作的相同的命令。XAMPP虛擬主機配置自定義文件夾(403錯誤)
爲此我創建了一個虛擬主機,它是如何被推薦的。 開始通過在主機Windows文件這樣的:
127.0.0.1 argentinaembalajes.local
127.0.0.1 www.argentinaembalajes.local
然後我設置httpd.vhosts.conf虛擬主機:
## localhost
<VirtualHost *:80>
DocumentRoot "C:/Users/myUserName/Desktop/webpages/"
ServerName localhost
</VirtualHost>
##Argentina Embalajes
<VirtualHost *:80>
ServerName argentinaembalajes.local
DocumentRoot C:/Users/myUserName/Desktop/webpages/argentinaembalajes/
ErrorLog "C:/Users/myUserName/Desktop/webpages/argentinaembalajes/mysite-error_log"
CustomLog "C:/Users/myUserName/Desktop/webpages/argentinaembalajes/mysite-access_log" common
<Directory "C:/Users/myUserName/Desktop/webpages/argentinaembalajes/">
DirectoryIndex index.php
Order allow,deny
Allow from all
Options Indexes FollowSymLinks
Options All
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
我嘗試那些CONFIGS的許多版本的「/」或與「\」,服務器別名,具有不同的權限組,沒有日誌文件等。 myUserName是管理員,但我嘗試始終以管理員身份執行xampp,每次測試失敗時,都關閉xampp並再次打開。
httpd.conf中設置這樣的:
DocumentRoot "C:/Users/myUserName/Desktop/webpages"
<Directory "C:/Users/myUserName/Desktop/webpages">
我也嘗試在同一文件中改變:
User daemon
Group daemon
於:用戶名爲myUsername
然後,我看到一些人包括以上虛擬主機標籤:
NameVirtualHost *:8080
或者在標籤內使用不同端口的站點名稱,不確定應該如何使用以及用於什麼目的。
我總是得到這個錯誤來自Apache: 「443:0的服務器證書不包括匹配的服務器名ID爲」
沒有虛擬主機工作正常的Apache。所以我想,我做的很多事情錯:(
謝謝你的時間。 – AngelLestat