1. 程式人生 > >阿帕奇配置本地虛擬站點,XAMPP環境下

阿帕奇配置本地虛擬站點,XAMPP環境下

noexec index.php roo xampp 域名 clas public .com document

首先利用XAMPP搭建的阿帕奇環境,必須得啟動,不能啟動的話www.baidu.com

技術分享圖片

在XAMPP的目錄下的apache,打開httpd-vhosts.conf文件

E:\XAMPP\apache\conf\extra

技術分享圖片

在最後加上這個

80就是監聽的端口

ServerName 就是本地的域名
DocumentRoot就是文件的環境
切記是\這種目錄的斜杠
Directory 也要改
 
<VirtualHost *:80>

 ServerName ymh.com

 DocumentRoot "E:\XAMPP\htdocs\jianshu\fabu\public
" <Directory "E:\XAMPP\htdocs\jianshu\fabu\public"> Options FollowSymLinks IncludesNOEXEC Indexes DirectoryIndex index.php index.html index.htm AllowOverride all Order Deny,Allow Allow from all Require all granted </Directory> </VirtualHost>

然後打開

C:\Windows\System32\drivers\etc

技術分享圖片

打開host文件

在最後加上這一句話


127.0.0.1 ymh.com

技術分享圖片

然後重啟阿帕奇OK!

技術分享圖片

阿帕奇配置本地虛擬站點,XAMPP環境下