Apache為mysql以及自己的項目設(shè)置虛擬路徑
更新時間:2009年12月11日 16:26:20 作者:
Apache為mysql以及自己的項目設(shè)置虛擬路徑
1.Apache2.2\conf\httpd.conf中釋放:
Include conf/extra/httpd-vhosts.conf(去掉前面的#)
2.httpd.conf中增加
<Directory "E:/work/test"> #項目文件夾DWM目錄,注意不要使用中文定義目錄與文件夾
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
<Directory "C:/phpMyAdmin"> #phpMyAdmin的安裝路徑
#
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
3.在文件Apache2.2\conf\extra\httpd-vhosts.conf中增加:
<VirtualHost *:80> #放在第一個
ServerAdmin webmaster@dummy-host2.ies.inventec
DocumentRoot "D:\work\test"
ServerName test
ErrorLog "logs/dummy-host2.ies.inventec-error.log"
CustomLog "logs/dummy-host2.ies.inventec-access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.ies.inventec
DocumentRoot "C:\Program Files\phpMyAdmin-2.11.4"
ServerName mysql
ErrorLog "logs/dummy-host2.ies.inventec-error.log"
CustomLog "logs/dummy-host2.ies.inventec-access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.ies.inventec
DocumentRoot "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs"
ServerName localhost
ErrorLog "logs/dummy-host2.ies.inventec-error.log"
CustomLog "logs/dummy-host2.ies.inventec-access.log" common
</VirtualHost>
4.在windows\system32\drivers\etc\hosts檔中增加:(是hosts檔,不是hosts.msn之類的)
127.0.0.1 test
127.0.0.1 mysql
5.在瀏覽器中輸入:
http://mysql/index.php //查看數(shù)據(jù)庫設(shè)置是否成功
http://test/index.php //查看項目路徑設(shè)置是否成功
Include conf/extra/httpd-vhosts.conf(去掉前面的#)
2.httpd.conf中增加
<Directory "E:/work/test"> #項目文件夾DWM目錄,注意不要使用中文定義目錄與文件夾
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
<Directory "C:/phpMyAdmin"> #phpMyAdmin的安裝路徑
#
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
3.在文件Apache2.2\conf\extra\httpd-vhosts.conf中增加:
復(fù)制代碼 代碼如下:
<VirtualHost *:80> #放在第一個
ServerAdmin webmaster@dummy-host2.ies.inventec
DocumentRoot "D:\work\test"
ServerName test
ErrorLog "logs/dummy-host2.ies.inventec-error.log"
CustomLog "logs/dummy-host2.ies.inventec-access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.ies.inventec
DocumentRoot "C:\Program Files\phpMyAdmin-2.11.4"
ServerName mysql
ErrorLog "logs/dummy-host2.ies.inventec-error.log"
CustomLog "logs/dummy-host2.ies.inventec-access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.ies.inventec
DocumentRoot "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs"
ServerName localhost
ErrorLog "logs/dummy-host2.ies.inventec-error.log"
CustomLog "logs/dummy-host2.ies.inventec-access.log" common
</VirtualHost>
4.在windows\system32\drivers\etc\hosts檔中增加:(是hosts檔,不是hosts.msn之類的)
127.0.0.1 test
127.0.0.1 mysql
5.在瀏覽器中輸入:
http://mysql/index.php //查看數(shù)據(jù)庫設(shè)置是否成功
http://test/index.php //查看項目路徑設(shè)置是否成功
相關(guān)文章
Linux中對lvm邏輯卷分區(qū)大小的調(diào)整教程(針對xfs與ext4不同文件系統(tǒng))
這篇文章主要給大家介紹了關(guān)于Linux中對lvm邏輯卷分區(qū)大小的調(diào)整教程(針對xfs與ext4不同文件系統(tǒng))的相關(guān)資料,文中通過示例代碼介紹的非常詳細(xì),需要的朋友可以參考借鑒,下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2018-10-10虛擬機(jī)中Linux新手入門配置IP以及重啟網(wǎng)絡(luò)
這篇文章主要為大家詳細(xì)介紹了虛擬機(jī)中Linux新手入門配置IP以及重啟網(wǎng)絡(luò)的方法,具有一定的參考價值,感興趣的小伙伴們可以參考一下2019-03-03關(guān)于Linux vi命令使用詳解(vim編輯器)
這篇文章主要介紹了關(guān)于Linux vi命令使用詳解(vim編輯器),文中詳細(xì)列舉了vi命令的用法,還不熟悉的朋友可以多看一下2023-03-03Linux系統(tǒng)下如何運行.sh文件的實現(xiàn)
這篇文章主要介紹了Linux系統(tǒng)下如何運行.sh文件的實現(xiàn),文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2019-12-12ubuntu20.04虛擬機(jī)無法上網(wǎng)的問題及解決
這篇文章主要介紹了ubuntu20.04虛擬機(jī)無法上網(wǎng)的問題及解決方案,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教2022-12-12Apache Pulsar 微信大流量實時推薦場景下實踐詳解
這篇文章主要為大家介紹了Apache Pulsar 微信大流量實時推薦場景下實踐詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪2022-11-11通過rsync+inotify實現(xiàn)數(shù)據(jù)的實時備份配置
在前面的博文中,我講到過利用rsync實現(xiàn)數(shù)據(jù)的鏡像和備份,但是要實現(xiàn)數(shù)據(jù)的實時備份,單獨靠rsync還不能實現(xiàn),本文就講述下如何實現(xiàn)數(shù)據(jù)的實時備份2013-09-09