无法使用ngnix在digitalocean上运行Laravel应用程序

时间:2017-03-27 12:10:48

标签: php laravel nginx

我的Laravel应用程序在每条路线上都返回404。

这是地址:http://67.205.191.11/,当我尝试http://67.205.191.11/classes时,会找不到404找不到。

我的nginx默认配置文件如下所示:

server {
    listen 80 default_server;
    listen [::]:80 default_server ipv6only=on;

    root /var/www/venture-backend/public/;
    index index.php index.html index.htm;

    # Make site accessible from http://localhost/
    server_name 67.205.191.11;

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

    # Only for nginx-naxsi used with nginx-naxsi-ui : process denied requests
    #location /RequestDenied {
    #       proxy_pass http://127.0.0.1:8080;
    #}

    #error_page 404 /404.html;

    # redirect server error pages to the static page /50x.html
    #
    #error_page 500 502 503 504 /50x.html;
    #location = /50x.html {
    #       root /usr/share/nginx/html;
    #}

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    location ~ \.php$ {
        try_files $uri /index.php =404;
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }

    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    #location ~ /\.ht {
    #       deny all;
    #}

}

任何人都知道我的路线无法正常工作?

0 个答案:

没有答案