修改mysql安装服务名称(Apache为mysql以及自己的项目设置虚拟路径)
修改mysql安装服务名称
Apache为mysql以及自己的项目设置虚拟路径
1.Apache2.2\conf\httpd.conf中释放:
Include conf/extra/httpd-vhosts.conf(去掉前面的#)
2.httpd.conf中增加
<Directory "E:/work/test"> #项目文件夹DWM目录,注意不要使用中文定义目录与文件夹
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
<Directory "C:/phpMyAdmin"> #phpMyAdmin的安装路径
#
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
3.在文件Apache2.2\conf\extra\httpd-vhosts.conf中增加:
复制代码 代码如下:
<VirtualHost *:80> #放在第一个
ServerAdmin webmaster@dummy-host2.ies.inventec
DocumentRoot "D:\work\test"
ServerName test
ErrorLog "logs/dummy-host2.ies.inventec-error.log"
CustomLog "logs/dummy-host2.ies.inventec-access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.ies.inventec
DocumentRoot "C:\Program Files\phpMyAdmin-2.11.4"
ServerName mysql
ErrorLog "logs/dummy-host2.ies.inventec-error.log"
CustomLog "logs/dummy-host2.ies.inventec-access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.ies.inventec
DocumentRoot "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs"
ServerName localhost
ErrorLog "logs/dummy-host2.ies.inventec-error.log"
CustomLog "logs/dummy-host2.ies.inventec-access.log" common
</VirtualHost>
4.在windows\system32\drivers\etc\hosts檔中增加:(是hosts檔,不是hosts.msn之类的)
127.0.0.1 test
127.0.0.1 mysql
5.在浏览器中输入:
http://mysql/index.php //查看数据库设置是否成功
http://test/index.php //查看项目路径设置是否成功
- apache的优化建议(Apache 网站速度更快)
- apache安全配置(apache在win2003下的安全设置配合文件夹权限目录,很好很安全)
- apache虚拟目录配置(Apache 添加虚拟目录注意事项)
- 如何认识服务器(关于Nginx、Apache、Tomcat三个WEB服务器的区别和认知)
- linux如何查看apache日志(限制 Apache日志文件大小的方法)
- clickhouse 底层架构(使用 Apache Superset 可视化 ClickHouse 数据的两种方法)
- apache服务部署tomcat(详解Apache 和 Tomcat 整合原理、配置方案)
- apachemodule定义(使ApacheBench支持multi-url的方法)
- win7如何搭建php环境(阿里云Win2016安装Apache和PHP环境图文教程)
- javapoi简单代码(Java使用Apache.POI中HSSFWorkbook导出到Excel的实现方法)
- apache安全配置使用教程(正确配置与维护Apache安全性设置方法)
- apache2.4支持php5.5吗(WINDOWS下php5.2.4+mysql6.0+apache2.2.4+ZendOptimizer-3.3.0配置)
- 开源asp.net(apache下支持asp.net的实现方法)
- apache服务配置详解(apache配置开启网站服务步骤)
- 虚拟机windows server安装php环境(winxp apache用php建本地虚拟主机的方法)
- linux安装phpstudy(PHPStudy下如何为Apache安装SSL证书的方法步骤)
- 文明6金币太少怎么办 文明6无限刷钱教程(文明6金币太少怎么办)
- 开国中将,王牌军63军首任政委,两个连襟一个上将一个少将传为佳话(王牌军63军首任政委)
- 臭名昭著的731部队最高负责人 石井四郎(臭名昭著的731部队最高负责人)
- 王牌部队,你看的剧情我看的时尚(你看的剧情我看的时尚)
- 被鉴定的古董价值300万 当心,你可能遇到诈骗了(被鉴定的古董价值300万)
- 英语难学吗(初中英语难学吗)
热门推荐
- angular简单介绍(详解Angular依赖注入)
- dedecms调用原始图(DEDECMS点击图片进入下一页功能实现教程)
- 如何解决AJAX 的缓存
- dedecms添加模板(dedecms正文自动排版插件 伪原创站必备)
- 阿里云对象存储oss收费吗(阿里云存储服务OSS基本概念)
- 如何在windows上搭建ftp服务器(Windows Server 2016如何搭建部署FTP服务器)
- python 读文件报错处理(解决python写入带有中文的字符到文件错误的问题)
- linux后台运行程序的命令(在后台运行Linux命令的方法)
- 使用python爬取网易云音乐(15行Python代码实现网易云热门歌单实例教程)
- html5复选框属性教程(HTML5单选框、复选框、下拉菜单、文本域的实现代码)
排行榜
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9