ECS上的Nginx给出“未指定输入文件”

时间:2019-07-08 11:58:19

标签: php nginx amazon-ecs

我用nginx和drupal部署了一个docker容器,在我的本地计算机上一切正常,但是在带有fargate的Amazon ECS上,它仅显示“未指定输入文件”

这是启动default.conf的方法

server {
    listen   80; ## listen for ipv4; this line is default and implied
    listen   [::]:80 default ipv6only=on; ## listen for ipv6

    root /var/www/app/;
    index index.php index.html index.htm;

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

    sendfile off;
    server_tokens off;

    # Add stdout logging
    error_log /dev/stdout info;
    access_log /dev/stdout;

    # reduce the data that needs to be sent over network
    gzip on;
    gzip_min_length 10240;
    gzip_proxied expired no-cache no-store private auth;
    gzip_types text/plain text/css text/xml application/json text/javascript application/x-javascript  application/xml;
    gzip_disable "MSIE [1-6]\.";

    location / {
        # First attempt to serve request as file, then
        # as directory, then fall back to index.html
        try_files $uri /index.php?$query_string;
    }

    # 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;
    }

0 个答案:

没有答案