`
xieye
  • 浏览: 806099 次
  • 性别: Icon_minigender_1
  • 来自: 南京
社区版块
存档分类
最新评论

nginx下的laravel的配置

阅读更多
本文是转载文章

来源:
https://laravelacademy.org/post/7514.html

以下是nginx下的 laravel 5.7 的nginx配置文件


配置如下:
server {
    listen 80;
    server_name example.com;
    index index.php
    client_max_body_size 50M;
    error_log /home/deploy/apps/logs/example.error.log;
    access_log /home/deploy/apps/logs/example.access.log;
    root /home/deploy/apps/example.com/current/public;

    location / {
        try_files $uri $uri/ /index.php$is_args$args;
    }

    location ~ \.php {
        try_files $uri = 404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param SCRIPT_NAME $fastcgi_script_name;
        fastcgi_index index.php;
        fastcgi_pass 127.0.0.1:9000;
    }
}
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics