设置本地虚拟域名windows+apache
C:\WINDOWS\system32\drivers\etc\hosts
在这个文件中 最下面添加。
- 127.0.0.1 localhost.com
- 127.0.0.1 cho.com
- 127.0.0.1 devwo.com
- 127.0.0.1 phpmyadmin.com
信息来自:http://blog.sina.com.cn/s/blog_7347580d0100w88d.html
D:\wamp\bin\apache\Apache2.2.17\conf\extra\httpd-vhosts.conf
添加与hosts 相应的 映射
- #
- # Virtual Hosts
- #
- # If you want to maintain multiple domains/hostnames on your
- # machine you can setup VirtualHost containers for them. Mostconfigurations
- # use only name-based virtual hosts so the server doesn't need toworry about
- # IP addresses. This is indicated by the asterisks in thedirectives 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 virtualhost
- # configuration.
- #
- # Use name-based virtual hosting.
- #
- NameVirtualHost *:80
- #
- # VirtualHost example:
- # Almost any Apache directive may go into a VirtualHostcontainer.
- # The first VirtualHost section is used for all requests that donot
- # match a ServerName or ServerAlias in any<VirtualHost> block.
- #
- <VirtualHost *:80>
- ServerAdminwebmaster@dummy-host.hleclerc-PC.ingenidev
- DocumentRoot"C:/Dev/Projets/WampServer2-64b/install_files_wampserver2/bin/apache/Apache2.2.17/docs/dummy-host.hleclerc-PC.ingenidev"
- ServerNamedummy-host.hleclerc-PC.ingenidev
- ServerAliaswww.dummy-host.hleclerc-PC.ingenidev
- ErrorLog"logs/dummy-host.hleclerc-PC.ingenidev-error.log"
- CustomLog"logs/dummy-host.hleclerc-PC.ingenidev-access.log" common
- </VirtualHost>
- <VirtualHost *:80>
- ServerAdminwebmaster@dummy-host2.hleclerc-PC.ingenidev
- DocumentRoot"C:/Dev/Projets/WampServer2-64b/install_files_wampserver2/bin/apache/Apache2.2.17/docs/dummy-host2.hleclerc-PC.ingenidev"
- ServerNamedummy-host2.hleclerc-PC.ingenidev
- ErrorLog"logs/dummy-host2.hleclerc-PC.ingenidev-error.log"
- CustomLog"logs/dummy-host2.hleclerc-PC.ingenidev-access.log" common
- </VirtualHost>
- /*-----------------------------*/
- <VirtualHost *:80>
- Options None
- ServerAdmin cho.com
- DocumentRoot E:\PHP\PHPProject\inpiao
- ServerName cho.com
- ErrorLog logs/phpmyadmin.com-error_log
- CustomLog logs/phpmyadmin.com-access_log common
- php_admin_value open_basedir "E:\PHP\PHPProject\inpiao"
- </VirtualHost>
- <VirtualHost *:80>
- Options None
- ServerAdmin devwo.com
- DocumentRoot E:\PHP\PHPProject\devwo
- ServerName devwo.com
- ErrorLog logs/phpmyadmin.com-error_log
- CustomLog logs/phpmyadmin.com-access_log common
- php_admin_value open_basedir "E:\PHP\PHPProject\devwo"
- </VirtualHost>
- <VirtualHost *:80>
- Options None
- ServerAdmin localhost.com
- DocumentRoot E:\PHP\PHPProject
- ServerName localhost.com
- ErrorLog logs/phpmyadmin.com-error_log
- CustomLog logs/phpmyadmin.com-access_log common
- php_admin_value open_basedir "E:\PHP\PHPProject"
- </VirtualHost>
- <VirtualHost *:80>
- Options None
- ServerAdmin phpmyadmin.com
- DocumentRoot D:\wamp\apps\phpmyadmin3.3.9
- ServerName phpmyadmin.com
- ErrorLog logs/phpmyadmin.com-error_log
- CustomLog logs/phpmyadmin.com-access_log common
- php_admin_value open_basedir "D:\wamp\apps\phpmyadmin3.3.9"
- </VirtualHost>
最后在 \conf\httpd.conf 中 开启
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
设置本地虚拟域名windows+apache的更多相关文章
- hosts设置本地虚拟域名
C:\Windows\System32\drivers\etc hosts 需要用管理员运行
- 域名可以解析(ping域名可以获取正确ip),服务器本地telnet 域名+端口 无法连接,通过建立本地虚拟域名指定的方法解决该问题
环境: 服务器A,网管已为A开通外网ip,且设置有映射域名:假如内网ip为172.16.2.6.外网ip为123.123.123.123.域名为test.sstest.com 现象: 服务器A,tel ...
- Windows环境下Nginx配置本地虚拟域名
进入conf文件夹,新建servers文件夹: 将内部的server配置段提取单独放在一个文件里,存到了conf/servers下,以方便配置多个虚拟主机. 并在nginx.conf里http配置段内 ...
- wamp添加本地虚拟域名
修改一下文件位置,引入文件 下面是配置文件添加配置指向目录 <VirtualHost *:80> ServerAdmin 979996962@qq.com DocumentRoot &qu ...
- windows Apache服务器简单配置虚拟域名(转载)
1.找到apache目录下的conf下的extra下的httpd-vhosts.conf虚拟主机配置文件 将下面的代码复制粘贴到最下面: #<VirtualHost *:80># ...
- apache的虚拟域名rewrite配置以及.htaccess的使用。
在web服务器领域,Apache基本上是一统天下的,虽然现在越来越多的人转向nginx的,但是仍然由于apache的高性能以及强大的功能,还是大多数服务器在使用Apache. apache的安装就先不 ...
- apache下虚拟域名配置
在我们开发中通过虚拟域名来访问一个指定的项目确实很方便,接下来教大家如何通过手动的方式去配置虚拟域名(已apache服务器为例) 一.首页我们得找到host文件.windows下这个文件在c盘中WIN ...
- xampp配置虚拟域名
首先使用notpad++(我用的notpad++,记事本也可以)打开(安装xampp目录下的)apach-->conf-->extra-->httpd-vhosts.conf 在文件 ...
- LAMP环境搭建+配置虚拟域名
Centos下PHP,Apache,Mysql 的安装 安装Apache yum -y install httpd systemctl start httpd 添加防火墙 firewall-cmd - ...
随机推荐
- markdown错误和问题
一,同步预览插件崩了 emmmmm……插件崩了,好滴 http://markdownpad.com/faq.html#livepreview-directx 上网下载插件 完美运行~ 二.emmmmm ...
- sql语句查询结果排序
order by 是用在where条件之后,用来对查询结果进行排序 order by 字段名 asc/desc asc 表示升序(默认为asc,可以省略) desc表示降序 order b ...
- SRTP参数及数据包处理过程(转)
源: SRTP参数及数据包处理过程
- selenium:2.selenium 键盘事件模拟
今晚不想加班,于是赶紧回来看看书,不知道今天怎么就突然特别想玩文明五,但是又要克制自己咯,所以还是看看书吧,干的事情有: 1.下了selenium的小工具:FireBug/FirePath. 2.确定 ...
- redis-3.2 集群
目录 简介 集群简介 Redis 集群的数据分片 Redis 集群的主从复制模型 Redis 一致性保证 redis 集群间的通信 环境 安装Ruby 部署 安装Redis略 创建集群 集群节点信息 ...
- ELK学习笔记之F5-HTTP-requesting-logging logstash filter
input { tcp { port => 514 type => 'f5-request' } } filter { if [type] == "f5-request" ...
- ajax返回数据
在使用远程js验证检测账户是否存在时,直在发请求后返回值无效,怎样把值返回回来呢重点注意两点 第一点:type不能省略,不能是异步,async: false 第二点:不能在直接请求成功后返回 var ...
- linux 安装二进制包程序一般步骤
参考:https://blog.csdn.net/linzhiji/article/details/6774410 configure/make/make install的作用 这些都是典型的使用GN ...
- Python-制作抖音图片
---------------------------------------------------------------------------------------------------- ...
- 如何在Framework中读取bundle中的Res
前因: 因为公司上架前后的原因,外围的平台层部分提前上线,而我做的功能部分需要晚一些上线,是单独的一个工程在其他仓库开发. 我的资源文件放在Bundle中.合到主工程中,资源文件不用改,直接拖进去.倒 ...