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