咨询热线:4006-75-4006
售前:9:00-23:30 备案:9:00-18:00 技术:7*24h
配置文件
<VirtualHost *> <Directory "D:/htdocs/www.landui.com"> Options -Indexes FollowSymLinks </Directory> ServerAdmin admin@www.landui.com DocumentRoot "D:/htdocs/www.landui.com" ServerName www.landui.com ServerAlias hack123.com www.landui.com ErrorLog logs/www.landui.com_log php_admin_value open_basedir "D:\htdocs\www.landui.com;C:\Windows\Temp;" </VirtualHost>
在apache2.4环境下导致无法启动服务
查看日志错误
后在一国外网站看出一些名堂
https://www.landui.com/questions/362682/403-error-after-upgrading-to-apache2-4
由于apache版本变化后指令有变迁
修改apache配置文件
<Directory /> AllowOverride none #Require all denied Require all granted //这里 不然php打开403错误 </Directory>
<VirtualHost *> <Directory "D:/htdocs/www.landui.com"> Options FollowSymLinks //2.4的配置 </Directory> ServerAdmin admin@www.landui.com DocumentRoot "D:/htdocs/www.landui.com" ServerName www.landui.com ServerAlias hack123.com www.landui.com ErrorLog logs/www.landui.com_log php_admin_value open_basedir "D:\htdocs\www.landui.com;C:\Windows\Temp;" </VirtualHost>
重启apache,顺利打开。