Apache sets virtual paths for MySQL and its own projects

Source: Internet
Author: User

1. Release in apache2.2 \ conf \ httpd. conf:
Include CONF/extra/httpd-vhosts.conf (remove the previous #)
2. Added in httpd. conf.
<Directory "E:/work/test"> # DWM directory of the project folder. do not define directories and folders in Chinese.
#
# Possible values for the options directive are "NONE", "all ",
# Or any combination:
# 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 installation path
#
#
# Possible values for the options directive are "NONE", "all ",
# Or any combination:
# 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. Add the following in the file apache2.2 \ conf \ extra \ httpd-vhosts.conf: CopyCode The Code is as follows: <virtualhost *: 80> # Put It In the first
Serveradmin webmaster@dummy-host2.ies.inventec
DocumentRoot "D: \ work \ test"
Servername Test
Errorlog "log/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 "log/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 "log/dummy-host2.ies.inventec-error.log"
Customlog "logs/dummy-host2.ies.inventec-access.log" common
</Virtualhost>

4. Add the following in the windows \ system32 \ drivers \ etc \ hosts: (hosts, not hosts. MSN)
127.0.0.1 Test
127.0.0.1 MySQL
5. Enter:
Http: // MySQL/index. php // check whether the database settings are successful
Http: // test/index. php // check whether the project path is set successfully.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.