wsl php nginx

回覆文章
yehlu
Site Admin
文章: 3245
註冊時間: 2004-04-15 17:20:21
來自: CodeCharge Support Engineer

wsl php nginx

文章 yehlu »

https://github.com/Microsoft/WSL/issues/393
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;
}
回覆文章

回到「10」