Nginx白页没有错误

时间:2017-01-16 21:34:15

标签: nginx

我是nginx的新手。我正在尝试使用kubernetes和nginx。但我得到一个空白页面,没有错误......我该怎么办? 在这里我的配置:

server {
    listen   80;
    root /var/www/project/web;

    location / {
        # try to serve file directly, fallback to app.php
        try_files $uri /app.php$is_args$args;
    }
    # DEV
    # This rule should only be placed on your development environment
    # In production, don't include this and don't deploy app_dev.php or config.php
    location ~ ^/(app_dev|config)\.php(/|$) {
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }
    # PROD
    location ~ ^/app\.php(/|$) {
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

        # Prevents URIs that include the front controller. This will 404:
        # http://domain.tld/app.php/some-path
        # Remove the internal directive to allow URIs like this
        #internal;
    }

    error_log /var/log/nginx/project_error.log;
    access_log /var/log/nginx/project_access.log;
}

修改:

我在docker-compose中运行它,现在我在启动时得到它:

  

web_1 | *重启PHP5 FastCGI流程管理器php5-fpm

修改2

  

connect()到unix:/var/run/php/php7.0-fpm.sock失败(2:没有这样的文件   连接到上游时的目录)

0 个答案:

没有答案