利用段口分虚拟主机,还有的,在Google搜索一下
http://www.google.cn/search?hl=zh-CN&newwindow=1&client=firefox-a&rls=org.mozilla:zh-CN:official&hs=gJS&sa=X&oi=spell&resnum=0&ct=result&cd=1&q=Apache+Virtualhost&spell=1代码(httpd.conf):#站点一:80段口虚拟主机
<VirtualHost *:80>
#例如站点一的根目录为D:\phpMyAdmin\80
DocumentRoot "D:\phpMyAdmin\80"
ServerName 127.0.0.1
</Virtualhost>#站点二:81段口虚拟主机
<VirtualHost *:81>
#例如站点二的根目录为D:\phpMyAdmin\81
DocumentRoot "D:\phpMyAdmin\81"
ServerName 127.0.0.1
</Virtualhost>#站点三:82段口虚拟主机
<VirtualHost *:82>
#例如站点一的根目录为D:\phpMyAdmin\82
DocumentRoot "D:\phpMyAdmin\82"
ServerName 127.0.0.1
</Virtualhost>#站点四:83段口虚拟主机
<VirtualHost *:83>
#例如站点二的根目录为D:\phpMyAdmin\83
DocumentRoot "D:\phpMyAdmin\83"
ServerName 127.0.0.1
</Virtualhost>
http://www.google.cn/search?hl=zh-CN&newwindow=1&client=firefox-a&rls=org.mozilla:zh-CN:official&hs=gJS&sa=X&oi=spell&resnum=0&ct=result&cd=1&q=Apache+Virtualhost&spell=1代码(httpd.conf):#站点一:80段口虚拟主机
<VirtualHost *:80>
#例如站点一的根目录为D:\phpMyAdmin\80
DocumentRoot "D:\phpMyAdmin\80"
ServerName 127.0.0.1
</Virtualhost>#站点二:81段口虚拟主机
<VirtualHost *:81>
#例如站点二的根目录为D:\phpMyAdmin\81
DocumentRoot "D:\phpMyAdmin\81"
ServerName 127.0.0.1
</Virtualhost>#站点三:82段口虚拟主机
<VirtualHost *:82>
#例如站点一的根目录为D:\phpMyAdmin\82
DocumentRoot "D:\phpMyAdmin\82"
ServerName 127.0.0.1
</Virtualhost>#站点四:83段口虚拟主机
<VirtualHost *:83>
#例如站点二的根目录为D:\phpMyAdmin\83
DocumentRoot "D:\phpMyAdmin\83"
ServerName 127.0.0.1
</Virtualhost>
解决方案 »
- $_POST无法接收由smarty模版自动生成的二维数组
- ip切换城市;修改ip地址,为什么城市名不变呢?
- 关于json数据的传递
- Facebook application 开发
- php 5.3 有闭包了 闭包有什么好处? 应该在什么场景下用闭包
- wamp phpmyadmin 打不开 懂得请进
- 写一个可以添加无限子级目录和以最简单的树形列出目录的功能,你要多久?
- php 数组取 在线等,急....~~~~~~~~~~~
- 这个登陆页面为什么不能回到前一个URL?
- 刚学写网页的,被卡了!是这样,我用PHP+Apache+Interbase的组合写了个最简单的测试(代码如下:)
- return 后,会自动释放资源吗?
- APACEH配置用IP+端口的访问模式,要求多站点!
#
# Redirect: Allows you to tell clients about documents that used to
# exist in your server's namespace, but do not anymore. The client
# will make a new request for the document at its new location.
# Example:
# Redirect permanent /foo http://meng/bar #
# Alias: Maps web paths into filesystem paths and is used to
# access content that does not live under the DocumentRoot.
# Example:
# Alias /webpath /full/filesystem/path
Alias /bbs "e:/bbs"
Alias /ba "e:/b1027"
Alias /d "d:"
Alias /FileUpload "e:/FileUpload"
Alias /z "d:/zoheflash"
#
# If you include a trailing / on /webpath then the server will
# require it to be present in the URL. You will also likely
# need to provide a <Directory> section to allow access to
# the filesystem path. #
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the target directory are treated as applications and
# run by the server when requested rather than as documents sent to the
# client. The same rules about trailing "/" apply to ScriptAlias
# directives as to Alias.
#
ScriptAlias /cgi-bin/ "D:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin/"</IfModule>
这是我用的虚拟目录配置
Alias /test d:/doc/aaa
<Directory d:/doc/aaa>
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
虚拟主机或是虚拟目录跟PHP有什么关系?