wsl php nginx
發表於 : 2019-02-21 11:59:58
https://github.com/Microsoft/WSL/issues/393
https://learnku.com/articles/19581
https://learnku.com/articles/19581
代碼: 選擇全部
location / {
try_files $uri $uri/ /index.php?$query_string; #laravel 框架需要此行
}
location ~ \.php$ {
proxy_set_header X-Forwarded-Proto $scheme;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_buffering off; # This must be here for WSL as of 11/28/2018
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PHP_VALUE "upload_max_filesize = 20M \n post_max_size=21M";
include /etc/nginx/fastcgi.conf;
}