Introduction to how to configure a virtual directory in php under windows_PHP tutorial

WBOY
Release: 2016-07-21 15:02:54
Original
887 people have browsed it

First open the httpd.conf file in Apache's conf directory and add the following code at the end:

Copy the code The code is as follows:


ServerName www.mydemo.com
DocumentRoot "D:/mydemo"

Options FollowSymLinks IncludesNOEXEC Indexes
DirectoryIndex index.html index.htm default.htm index.php default.php index.cgi default.cgi index.pl default.pl index.shtml
AllowOverride Options FileInfo
Order Deny,Allow
Allow from all



Go to C:->Windows->System32->drivers->etc directory and open hosts document.
Add the following code at the end:
Copy the code The code is as follows:

127.0.0.1 www.mydemo.com

Then create the D: mydemo directory
and then restart the apache server.
Enter www.mydemo.com in your browser to take a look

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/327895.htmlTechArticleFirst open the httpd.conf file in Apache's conf directory and add the following code at the end: Copy the code as follows: VirtualHost *:80 ServerName www.mydemo.com DocumentRoot "D:/mydemo" Di...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!