lnmp部署laravel

软件发布|下载排行|最新软件

当前位置:首页IT学院IT技术

lnmp部署laravel

史亚运   2020-03-06 我要评论

修改nginx/conf/nginx.conf里 server下root项目入口文件目录

server
    {
        listen 80 default_server reuseport;
        #listen [::]:80 default_server ipv6only=on;
        server_name _;
        index index.html index.htm index.php;
        #root  /home/wwwroothttps://img.qb5200.com/download-x/default;
        root  /home/wwwroot/www.shiyayun.cn/public;

nginx/conf/nginx.conf里server下新增 location /

        location / {
            index index.html index.htm index.php;
            try_files $uri $uri/ /index.php?$query_string; #隐藏index.php
        }

注释nginx/conf/enable-php.conf 里的try_files $uri =404;

location ~ [^/]\.php(/|$)
        {
            #try_files $uri =404;
            fastcgi_pass  unix:/tmp/php-cgi.sock;
            fastcgi_index index.php;

            include fastcgi.conf;
        }

lnmp restart重启环境

Copyright 2022 版权所有 软件发布 访问手机版

声明:所有软件和文章来自软件开发商或者作者 如有异议 请与本站联系 联系我们