【备份】信工apache中有关http.conf的虚拟目录相关配置参考
2012-09-22 09:19
525 查看
参考信工服务器的
在http.conf文件的后面设置是这样(#为注释)
#打开虚拟端口
NameVirtualHost *:80
#设置虚拟端口80的目录
#ServerName 是访问的域名或IP
#DocumentRoot 是对应的IP
<Virtualhost *:80>
ServerName 210.38.206.90
DocumentRoot c:/wamp/www/
</Virtualhost>
#上述这个就是使用210.38.206.90(或者域名)访问,就读取c:/wamp/www/的网站
<Virtualhost *:80>
ServerName 210.38.206.21
DocumentRoot C:\www\shelianwang\upload
</Virtualhost>
<Virtualhost *:80>
ServerName 210.38.206.92
DocumentRoot c:/wamp/www/wordpress/
</Virtualhost>
这样,服务器在同一台机上,
但访问210.38.206.21
210.38.206.90
210.38.206.92
都会读取不同的目录和网站
当然,如果你只有一个ip
可以设置
NameVirtualHost *:8080
<Virtualhost *:8080>
ServerName 210.38.206.90
DocumentRoot c:/wamp/www/
</Virtualhost>
来指定自定义的目录
在http.conf文件的后面设置是这样(#为注释)
#打开虚拟端口
NameVirtualHost *:80
#设置虚拟端口80的目录
#ServerName 是访问的域名或IP
#DocumentRoot 是对应的IP
<Virtualhost *:80>
ServerName 210.38.206.90
DocumentRoot c:/wamp/www/
</Virtualhost>
#上述这个就是使用210.38.206.90(或者域名)访问,就读取c:/wamp/www/的网站
<Virtualhost *:80>
ServerName 210.38.206.21
DocumentRoot C:\www\shelianwang\upload
</Virtualhost>
<Virtualhost *:80>
ServerName 210.38.206.92
DocumentRoot c:/wamp/www/wordpress/
</Virtualhost>
这样,服务器在同一台机上,
但访问210.38.206.21
210.38.206.90
210.38.206.92
都会读取不同的目录和网站
当然,如果你只有一个ip
可以设置
NameVirtualHost *:8080
<Virtualhost *:8080>
ServerName 210.38.206.90
DocumentRoot c:/wamp/www/
</Virtualhost>
来指定自定义的目录
相关文章推荐
- 关于【apache- tomcat- 5.5.15/conf /Catalina/localhost配置虚拟目录】时的一些问题。(配置web项目的方式不止一种,虚拟目录就是一个)
- apache 虚拟主机详细配置:http.conf配置详解
- Apache HttpServer 虚拟目录配置
- 关于【apache- tomcat- 5.5.15/conf /Catalina/localhost配置虚拟目录】时的一些问题。(配置web项目的方式不止一种,虚拟目录就是一个)
- 目录权限Apache httpd.conf相关知识点--默认的开始页面、目录权限、虚拟主机
- Apache httpd.conf相关知识点--默认的开始页面、目录权限、虚拟主机
- apache 虚拟主机详细配置:http.conf配置详解
- apache 虚拟主机详细配置:http.conf配置详解
- apache配置虚拟目录与默认文档
- Apache主要配置文件http.conf
- apache配置虚拟目录
- tomcat虚拟目录和虚拟主机等相关配置
- centos中指定apache启动时加载实用的配置文件http.conf
- wamp3.06版本的80端口的配置 1 找到 C:\wamp64\bin\apache\apache2.4.23\conf\extra 目录 打开 httpd-vhosts.conf 文件复制下
- Apache虚拟目录与虚拟主机配置
- apache配置文件:http.conf配置详解
- Apache虚拟主机和虚拟目录+tomcat集成的配置
- Apache配置虚拟目录和多主机头的方法
- apache配置虚拟目录
- Apache的配置文件http.conf参数含义详解