Apache sets the virtual path for MySQL and its own project _linux

Source: Internet
Author: User
Tags phpmyadmin
Release in 1.apache2.2\conf\httpd.conf:
Include conf/extra/httpd-vhosts.conf (remove front #)
Increase in 2.httpd.conf
<directory "E:/work/test" >#项目文件夹DWM目录, be careful not to use Chinese to define directories and folders
#
# Possible values for the Options directive are ' None ', ' all ',
# or any combination of:
# Indexes Includes followsymlinks symlinksifownermatch execcgi multiviews
#
# that ' MultiViews ' must be named *explicitly*---' Options all '
# doesn ' t give it to you.
#
# The Options directive is both complicated and important. Please
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options FollowSymLinks
#
# AllowOverride Controls What directives may is 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
#
# that ' MultiViews ' must be named *explicitly*---' Options all '
# doesn ' t give it to you.
#
# The Options directive is both complicated and important. Please
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride Controls What directives may is 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. Increase in the document apache2.2\conf\extra\httpd-vhosts.conf:
Copy Code code as follows:

<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. Increase in windows\system32\drivers\etc\hosts files: (Hosts, not hosts.msn, etc.)
127.0.0.1 Test
127.0.0.1 MySQL
5. In the browser, enter:
http://mysql/index.php//See if Database settings are successful
http://test/index.php//See if the project path settings are successful
Related Article

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.