php Apache 搭建局域网环境配置

<VirtualHost *:80>                #端口号(默认80)
DocumentRoot "D:/phpstudy_pro/WWW/hqqlhh"     #网站目录
ServerName 192.168.1.92           #本机IP局域网访问
ServerName hqqlhh.s                #域名配置(仅本机访问)与host匹配    127.0.0.1 hqqlhh.s
ServerAlias 192.168.1.92             #网站别名(如果不设置域名hqqlhh.s,无需配置此项,但本机访问也要用IP)
FcgidInitialEnv PHPRC "D:/phpstudy_pro/Extensions/php/php5.6.9nts"
AddHandler fcgid-script .php
FcgidWrapper "D:/phpstudy_pro/Extensions/php/php5.6.9nts/php-cgi.exe" .php
<Directory "D:/phpstudy_pro/WWW/hqqlhh">
Options FollowSymLinks ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
DirectoryIndex index.php index.html error/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
</VirtualHost>

posted @ 2022-02-24 09:40  枫落曳  阅读(162)  评论(0)    收藏  举报