<VirtualHost *:80>
DocumentRoot "C:\phpStudy\PHPTutorial\WWW\tp6\public"
ServerName www.tp6.net
ServerAlias
<Directory "C:\phpStudy\PHPTutorial\WWW\tp6\public">
Options FollowSymli
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
2,使用Nginx部署 (运行失败)
PS:产生错误
https://oss.alasbusy.com/uploads/20190822/826c3b405d817343431eca3eccfeb30c.png
https://oss.alasbusy.com/uploads/20190822/7526f83a717e07764f2aee3347910eab.png
没错 “/t” 被转换为了 水平制表符(HT)
https://oss.alasbusy.com/uploads/20190822/5f59b420e4953ec07405d8cf4a4a0e25.png
server {
listen 80;
server_name www.tp6.net tp6.net;
root "C:\phpStudy\PHPTutorial\WWW\tp6\public";
location / {
index index.html index.htm index.php;
#autoindex on;
}
location ~ \.php(.*)$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
fastcgi_param sc
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
include fastcgi_params;
}
}
解决方案:
"\" 换成 “/” 或者改名 就OK了
原文链接https://www.alasbusy.com/detail/68.html
最佳答案