Parse the details of how to write a virtual directory to PHP in Apache _php tutorial

Source: Internet
Author: User
Step 1. First open the httpd.conf file inside the appserv\apache2.2\conf. Found in:
LoadModule Rewrite_module modules/mod_rewrite.so This line, the "#" in front of him to remove.
Step 2. Find: Include conf/extra/httpd-vhosts.conf remove the "#" from his front. (Very critical)
And then we'll find:

Options followsymlinks execcgi Indexes
AllowOverride None
Order Deny,allow
Deny from all
Satisfy All

Change it to:

Options followsymlinks execcgi Indexes
AllowOverride All
Order Deny,allow
Deny from all
Satisfy All

However, step 2 this step in my setup process as if not set is also possible. So I think it depends on the situation.
Step 3. Still found in this file:
DocumentRoot "e:/appserv/www/" and change it to the path we want to display by default. Such as:
DocumentRoot "e:/appserv/www/www/".
you will also:
Also read:

Step 3 seems to be no need to set. Alas, I do not understand here. In the course of my setup. It seems like sometimes it's right to not set this up. It seems like sometimes it's not right to set this up. Let's see what happens. It's better to set it up.
Step 4: Save the file. Then go to the appserv\apache2.2\conf\extra inside of the httpd-vhost.conf file open:
will be inside of:

ServerAdmin webmaster@dummy-host2.x
DocumentRoot "c:/apache2.2/docs/dummy-host2.x"
ServerName dummy-host2.x
Errorlog "Logs/dummy-host2.x-error.log"
Customlog "Logs/dummy-host2.x-access.log" common

This configuration changes to:

ServerAdmin webmaster@dummy-host2.x
DocumentRoot "E:\AppServ\www\www"
ServerName localhostes
Errorlog "Logs/dummy-host2.x-error.log"
Customlog "Logs/dummy-host2.x-access.log" common

How many of these virtual directories are configured.
and then save.
Step 5: Locate the Hosts file inside the C:\WINDOWS\SYSTEM32\DRIVERS\ETC and open:
On the last side add:
127.0.0.1 localhostes
You can specify more than one virtual name, such as:
127.0.0.1 Localhostes Local.
Save.
Done.
Restart Apache. Mine is Appserv. I'll reboot. Then write in the browser:
Http://localhostes. Enter to try.
It's interesting. If you don't feel good. Just replace the localhostes with:
It?
Isn't it cool?

http://www.bkjia.com/PHPjc/327814.html www.bkjia.com true http://www.bkjia.com/PHPjc/327814.html techarticle Step 1. First open the httpd.conf file inside the appserv\apache2.2\conf. Found inside: LoadModule rewrite_module modules/mod_rewrite.so This line, the "#" in front of him to remove. Steps ...

  • 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.