Apache vhost配置
来源:互联网 发布:观澜网络官网 编辑:程序博客网 时间:2024/05/16 06:51
1.用记事本打开apache目录下httpd文件,找到如下模块。
# Virtual host
#Include conf/extra/httpd-vhosts.conf
将include前的#号去掉,使其支持vhosts功能。
2.打开 host文件增加一行,作用为将制定的域名指向本地服务器。
127.0.0.1 www.hys.com
3.打开conf/extra/httpd-vhosts.conf 这个文件 更改如下:
#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot "D:\WORK\hys"
ServerName hys.com
ServerAlias www.hys.com
ErrorLog "logs/dummy-host2.localhost-error.log"
CustomLog "logs/dummy-host2.localhost-access.log" common
<Directory D:\WORK\hys>
Options FollowSymLinks
AllowOverride None
Order deny,allow
allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot "D:\WORK\AppServ\www"
ServerName localhost
ServerAlias localhost
ErrorLog "logs/dummy-host2.localhost-error.log"
CustomLog "logs/dummy-host2.localhost-access.log" common
<Directory D:\WORK\AppServ\www>
Options FollowSymLinks
AllowOverride None
Order deny,allow
allow from all
</Directory>
</VirtualHost>
最后保存所有更改 重启电脑。
重启后则可以
D:\WORK\hys 用www.hys.com访问
D:\WORK\AppServ\www 用localhost访问
- apache配置vhost
- APACHE VHOST配置
- apache 基本vhost配置
- apache vhost.conf配置
- Apache vhost 配置
- apache vhost的配置
- Apache vhost的配置
- 配置apache虚拟主机vhost
- apache 基本vhost配置
- apache vhost配置
- Apache vhost配置
- Apache vhost的配置
- apache vhost配置 --虚拟主机
- apache 配置vhost
- apache.vhost配置
- Ubuntu 14.04, Apache vhost 配置
- apache vhost 虚拟配置问题
- mac apache下面配置vhost
- annotation(spring注解)
- mac下eclipse的svn插件的安装
- poj 1003 Hangover
- JVM(四)------内存调优
- P2P投资者需擦亮眼
- Apache vhost配置
- Mysql 免安装版本
- 学习性能测试笔记
- [BFS]HDU1044 Collect More Jewels
- ORACLE9i_性能调优基础八(SQL tuning)
- 混进省队后的进化系统
- ORACLE——Instant Client配置SQL*LDR、EXP等命令工具
- 【钱钱贷】p2p理财莫被高收益迷了双眼
- AIR操作zip解压文件到指定目录下