php 在windows下配置虛擬目錄的方法介紹
更新時間:2013年06月26日 10:52:35 作者:
本篇文章在是對在windows下配置虛擬目錄的方法進(jìn)行了詳細(xì)的分析介紹,需要的朋友參考下
先打開Apache的conf目錄下的httpd.conf文件,在末尾添加如下代碼:
<VirtualHost *:80>
ServerName www.mydemo.com
DocumentRoot "D:/mydemo"
<Directory "D:/mydemo">
Options FollowSymLinks IncludesNOEXEC Indexes
DirectoryIndex index.html index.htm default.htm index.php default.php index.cgi default.cgi index.pl default.pl index.shtml
AllowOverride Options FileInfo
Order Deny,Allow
Allow from all
</Directory>
</VirtualHost>
再到C:->Windows->System32->drivers->etc目錄,打開hosts文件。
在末尾添加如下代碼:
127.0.0.1 www.mydemo.com
然后再創(chuàng)建D:\mydemo目錄
再然后重啟一下apache服務(wù)器。
在瀏覽器輸入www.mydemo.com看看
復(fù)制代碼 代碼如下:
<VirtualHost *:80>
ServerName www.mydemo.com
DocumentRoot "D:/mydemo"
<Directory "D:/mydemo">
Options FollowSymLinks IncludesNOEXEC Indexes
DirectoryIndex index.html index.htm default.htm index.php default.php index.cgi default.cgi index.pl default.pl index.shtml
AllowOverride Options FileInfo
Order Deny,Allow
Allow from all
</Directory>
</VirtualHost>
再到C:->Windows->System32->drivers->etc目錄,打開hosts文件。
在末尾添加如下代碼:
復(fù)制代碼 代碼如下:
127.0.0.1 www.mydemo.com
然后再創(chuàng)建D:\mydemo目錄
再然后重啟一下apache服務(wù)器。
在瀏覽器輸入www.mydemo.com看看
相關(guān)文章
PHP中unset,array_splice刪除數(shù)組中元素的區(qū)別
php中刪除數(shù)組元素是非常的簡單的,但有時刪除數(shù)組需要對索引進(jìn)行一些排序要求我們會使用到相關(guān)的函數(shù),這里我們來介紹使用unset,array_splice刪除數(shù)組中的元素區(qū)別吧2014-07-07php根據(jù)年月獲取當(dāng)月天數(shù)及日期數(shù)組的方法
這篇文章主要介紹了php根據(jù)年月獲取當(dāng)月天數(shù)及日期數(shù)組的方法,涉及php針對日期的相關(guān)判斷、轉(zhuǎn)換及字符與數(shù)組的遍歷操作相關(guān)技巧,需要的朋友可以參考下2016-11-11PHP 訪問數(shù)據(jù)庫配置通用方法(json)
目的是通過通用類訪問配置文件的方式,提供對數(shù)據(jù)庫連接的動態(tài)獲取和設(shè)置,使開發(fā)時和生產(chǎn)應(yīng)用時都能夠提供靈活的、簡化的、解耦的操作方式,需要的朋友可以參考下2018-05-05php實現(xiàn)的返回數(shù)據(jù)格式化類實例
這篇文章主要介紹了php實現(xiàn)的返回數(shù)據(jù)格式化類及其應(yīng)用實例,包括針對XML、JSON等的格式化,非常具有實用價值,需要的朋友可以參考下2014-09-09