WAMP下Apache配置Vhost (2
发布网站添加虚拟机"/usr/local/apache/conf/extra/httpd-vhost.conf"的最下面:
<VirtualHost *:80>
ServerName test.wordpress.com
DocumentRoot "F:\wwwroot\wordpress"
SetEnv APPLICATION_ENV "development"
<Directory
"F:\wwwroot\wordpress">
DirectoryIndex index.php
AllowOverride All
Order
allow,deny
Allow from
all
</Directory>
</VirtualHost>
1、由于后面虚拟机中需要用到Rewrite所以先编辑Apache的conf目录下的httpd.conf文件。(可根据实际需要操作)
添加mod_rewrite.so模块支持。去掉下列行中前面的#号。
LoadModule rewrite_module modules/mod_rewrite.so
2、配置apache支持虚拟机。这一步很重要。
# Virtual hosts
#Include conf/extra/httpd-vhosts.conf
找到 上面相关文本,去掉#Include conf/extra/httpd-vhosts.conf前的#。
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
保存退出。
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
# <<A
href="http://httpd.apache.org/docs/2.2/vhosts/">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 example:
# Almost any Apache directive may go into a VirtualHost
container.
# The first VirtualHost section is used for all requests that do
not
# match a ServerName or ServerAlias in any block.
#
#管理员邮箱
ServerAdmin admin@admin.com
#项目根目录
DocumentRoot
"D:/htdocs/frame_export"
#域名
ServerName
test.t.sina.com.cn
#别名
ServerAlias
test.t.sina.com.cn
#错误日志路径
ErrorLog
"logs/test.t.sins.com.cn-error.log"
CustomLog
"logs/test.t.sins.com.cn-access.log" common
RewriteEngine on
#重写规则,可根据实际需要添加
RewriteRule
^/(.*)$
/apps/index.php [L]
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/jiangfeng08/archive/2010/07/26/5766932.aspx
WAMP下Apache配置Vhost (2的更多相关文章
- wamp下Apache配置vhost
1.由于后面虚拟机中需要用到Rewrite所以先编辑Apache的conf目录下的httpd.conf文件.(我的文件位置是:D:\Program Files\wamp\bin\apache\apac ...
- Windows下 wamp下Apache配置虚拟域名
安装好wamp后 找到 找到 Include conf/extra/httpd-vhosts.conf 去掉前面的# 并保存 修改 DocumentRoot 和 ServerName ...
- CentOS下Apache配置多域名或者多端口映射
CentOS下Apache默认网站根目录为/var/www/html,假如我默认存了一个CI项目在html文件夹里,同时服务器的外网IP为ExampleIp,因为使用的是MVC框架,Apache需开启 ...
- Linux下Apache配置HTTPS功能
Apache配置HTTPS功能 转 https://www.cnblogs.com/liaojiafa/p/6028816.html 一.yum 安装openssl和openssl-devel,ht ...
- phpstudy集成下Apache配置部署https安全证书
一..先申请到安全证书.(腾讯云或者阿里云申请免费1年的安全证书),怎么申请这里也说下(以腾讯云为例): 1.登录腾讯云QQ或微信登录都行,第一次登录要通过实名认证,点击[产品]---[ss证书l] ...
- windows下apache配置https
1.下载带有openSSL的apache安装包,我下载的为apache_2.2.11-win32-x86-openssl-0.9.8i.msi,安装后确认一下bin路径下的openssl.exe,ss ...
- windows下Apache配置SSL安全连接
什么是SSL? SSL(Secure Socket Layer): 是为Http传输提供安全的协议,通过证书认证来确保客户端和网站服务器之间的数据是安全.Open SSL下载地址:http://www ...
- windows下apache配置ssl(https)服务器
SSl是为Http传输提供安全的协议,通过证书认证来确保客户端和网站服务器之间的数据是安全, 可以通过apache自带的openssl进行配置: 步骤如下: 1.安装有openssl模板的apache ...
- Windows下Apache配置域名
1.打开httpd.conf 找到“Include conf/extra/httpd-vhosts.conf”这一行,取消前面的#号注释并保存 2.修改httpd-vhosts.conf文件 进入ap ...
随机推荐
- shell chmod中数字与字母的含义
数字与字母的组合是chmod命令赋予文件,目录访问权限的方式 访问权限:可读,可写,可执行 字母表示:r , w , x 数字表示:4 , 2 , 1 , ...
- CompositePattern(23种设计模式之一)
设计模式六大原则(1):单一职责原则 设计模式六大原则(2):里氏替换原则 设计模式六大原则(3):依赖倒置原则 设计模式六大原则(4):接口隔离原则 设计模式六大原则(5):迪米特法则 设计模式六大 ...
- laravel与front-end
准备工作 在此之前要安装node . npm .这里安装node . npm 就不介绍了,百度一大把. 安装所有的npm依赖包 //进入项目的根目录 npm install 安装完后会出现一个nod ...
- (转)jquery仿天猫商城左侧导航菜单
原文地址:http://www.cnblogs.com/WinKi/p/3398824.html 之前看到有博友写了一个仿天猫商城左侧导航菜单,可惜不提供免费下载,也没有代码.以前自己也写过类似的效果 ...
- 关于spring”通配符的匹配很全面, 但无法找到元素 'context:component-scan' 的声明“的错误
关于spring配置的问题 近日学习spring时遇到了这个问题: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreExcept ...
- 三分题两道:lightoj1146 Closest Distance、lightoj1240 Point Segment Distance (3D)
lightoj1146 Two men are moving concurrently, one man is moving from A to B and other man is moving f ...
- [转]windows7远程桌面连接失败:发生身份验证错误。要求的函数不受支持
转至:https://jingyan.baidu.com/article/d169e18604ca86436611d821.html 系统升级后出现远程连接报错,“发生身份验证错误.要求的函数不受支持 ...
- 人力资源管理 winform C#
主旨思想:数据库(增,删,改,查) 资源管理器目的:实现基本人员信息 存储,调用,查看头像,修改内容. 注意事项: 1.建立两个表格 (人员表(cold,name,bumen,phone,t ...
- JAVA8 Lambda 表达式使用心得
List<HashMap> 指定数据求和: List<HashMap> kk = new ArrayList<>(); Map mmm = new H ...
- 转载:解决CentOS7虚拟机无法上网并设置CentOS7虚拟机使用静态IP上网
最近在VMware虚拟机里玩Centos,装好后发现上不了网.经过一番艰辛的折腾,终于找到出解决问题的方法了.最终的效果是无论是ping内网IP还是ping外网ip,都能正常ping通.方法四步走: ...