Configuration files under Apache httpd.conf, httpd-vhosts.conf turn

Source: Internet
Author: User

Configuration files under Apache httpd.conf, httpd-vhosts.conf (Windows)

2013-05-24 22:09 by Youxin, 58 reading, 0 reviews, Favorites, compilation

httpd.conf files typically exist in the C onf folder in the Apache directory, and are primarily used to configure Apache.
Http.conf inside the configuration introduction:

1, Listen: Listening port, the default is 80. 2, ServerAdmin: Server administrator mailbox. 3, ServerName: Service name. 4, the path of the documentroot:php website. 5. <directory/> Options followsymlinks
AllowOverride None
Order Deny,allow
Deny from all
</directory>apache access to each directory can be set with the relevant services and features that are allowed or (and) disallowed. As a general rule, a 403 page error may occur. <directory/> Options followsymlinks
AllowOverride None
</Directory>

Also modify the PHP directory:
Modify DocumentRoot and <directory "D:/program Files/xampp/htdocs" >.
Modify the directory that contains the Web site for PHP as follows: To view the problem:
Run DOS, enter "cd/d F:/xampplite/apache/bin", go to Xampp bin directory, enter Httpd.exe to see the error.
Problems
1, ServerRoot is not configured well, you can use absolute path
2, document is not configured well, the site path is not configured well
3, httpd-vhosts.conf is not configured well, the configuration reference is as follows

<virtualhost *:80>
ServerName localhost
DocumentRoot F:/web/public

Rewriteengine off

<location/>
Rewriteengine on
Rewritecond%{request_filename}!-f
Rewritecond%{request_filename}!-d
Rewriterule!\. (JS|ICO|GIF|JPG|PNG|CSS) $/index.php
</Location>

<directory f:/xampplite/htdocs>
Options Indexes FollowSymLinks
AllowOverride All
Order Allow,deny
Allow from all
</Directory>

</VirtualHost>
If you do not have permission, the httpd.conf also adds a:

<directory "f:/Sync folder/Baidu Cloud Sync disk/htdocs" >
Options Indexes FollowSymLinks
AllowOverride All
Order Allow,deny
Allow from all
Require all granted
</Directory>


Transferred from: http://blog.sina.com.cn/s/blog_6721f25c0100m3yy.html

Configuration files under Apache httpd.conf, httpd-vhosts.conf turn

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.