搜索 |
<VirtualHost _default_:80>
#<VirtualHost *:8036>
#网站路劲
DocumentRoot "D:/phpstudy_pro/WWW"
#网站环境
FcgidInitialEnv PHPRC "D:/phpstudy_pro/Extensions/php/php7.3.4nts"
AddHandler fcgid-script .php
FcgidWrapper "D:/phpstudy_pro/Extensions/php/php7.3.4nts/php-cgi.exe" .php
#网站配置
<Directory "D:/phpstudy_pro/WWW">
Options FollowSymLinks ExecCGI
AllowOverride All
Order deny,allow
#只允许这个IP访问
Deny from all
Allow from 127.0.2.3
Require all granted
DirectoryIndex index.php index.html
</Directory>
#发生错误时候的指向
ErrorDocument 400 /error/400.html
ErrorDocument 403 /error/403.html
ErrorDocument 404 /error/404.html
ErrorDocument 500 /error/500.html
ErrorDocument 501 /error/501.html
ErrorDocument 502 /error/502.html
ErrorDocument 503 /error/503.html
ErrorDocument 504 /error/504.html
ErrorDocument 505 /error/505.html
ErrorDocument 506 /error/506.html
ErrorDocument 507 /error/507.html
ErrorDocument 510 /error/510.html
#不允许访问/test/下的.php文件
<Directory "D:/phpstudy_pro/WWW/test">
<Files ~ ".php">
Order allow,deny
Deny from all
</Files>
</Directory>
#不允许访问/e/config和/e/admin目录
<Directory D:/phpstudy_pro/WWW/e/config>
Order Deny,Allow
Deny from all
</Directory>
<Directory D:/phpstudy_pro/WWW/e/admin>
Order Deny,Allow
Deny from all
</Directory>
#所有以php结尾的都不允许访问
<Files ~ "php$">
Order allow,deny
Deny from all
</Files>
</VirtualHost>