nginx返回“找不到文件。”码头上的错误

问题描述 投票:0回答:1

[我在Windows 10的D:驱动器中有一个项目文件夹,并且我的目录结构如下:

D:.
|   docker-compose.yml
|   Dockerfile
|
+---conf
|       php.ini
|
+---logs
|       access.log
|       error.log
|
+---sites
|       default.conf
|
\---www
    \---default
            index.html
            index.php

我的Dockerfile内容如下:

FROM php:7.3-fpm

RUN docker-php-ext-install pdo_mysql pdo

RUN pecl install xdebug
RUN docker-php-ext-enable xdebug

COPY conf/php.ini /etc/php/7.3/fpm/conf.d/40-custom.ini

docker-compose.yml就像这样:

version: '3'

networks:
  analytics_test:

services:

  nginx:
    image: nginx
    container_name: nginx_server
    ports:
      - "80:80"
      - "443:443"
    depends_on:
      - php
    volumes:
      - ./logs:/var/log/nginx
      - ./sites:/etc/nginx/conf.d
      - ./www:/var/www/html
    command: [nginx-debug, '-g', 'daemon off;']
    networks:
      - analytics_test

  php:
    container_name: php73_fpm
    build:
      context: .
      dockerfile: Dockerfile
    working_dir: /var/www/html
    ports:
      - "9000:9000"
    networks:
      - analytics_test

最后这是我的default.conf:

server {
  listen 80;
  server_name localhost;
  index index.php index.html;
  error_log /var/log/nginx/error.log debug;
  access_log /var/log/nginx/access.log;
  root /var/www/html/default;

  location / {
    try_files $uri $uri/ /index.php?$query_string;
  }

  location ~ \.php$ {
    try_files $uri =404;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    include       fastcgi_params;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_pass  php:9000;
    fastcgi_param PATH_INFO $fastcgi_path_info; 
  }
}

当我运行这些命令时,一切都会开始并保持运行状态。没有退出的实例:

docker-compose build && docker-compose up -d

但是当我进入浏览器并点击localhost时,nginx向我显示“找不到文件”。错误,而不是404错误之一,它只是说“找不到文件”。没有别的。

所以我检查了errors.log文件,这是它的内容:

2019/12/13 14:37:49 [debug] 6#6: epoll add event: fd:6 op:1 ev:00002001
2019/12/13 14:37:53 [debug] 6#6: accept on 0.0.0.0:80, ready: 0
2019/12/13 14:37:53 [debug] 6#6: posix_memalign: 000056473C9EE7C0:512 @16
2019/12/13 14:37:53 [debug] 6#6: *1 accept: 172.20.0.1:51498 fd:3
2019/12/13 14:37:53 [debug] 6#6: *1 event timer add: 3: 60000:9766049
2019/12/13 14:37:53 [debug] 6#6: *1 reusable connection: 1
2019/12/13 14:37:53 [debug] 6#6: *1 epoll add event: fd:3 op:1 ev:80002001
2019/12/13 14:37:53 [debug] 6#6: accept on 0.0.0.0:80, ready: 0
2019/12/13 14:37:53 [debug] 6#6: posix_memalign: 000056473C9EA860:512 @16
2019/12/13 14:37:53 [debug] 6#6: *2 accept: 172.20.0.1:51500 fd:11
2019/12/13 14:37:53 [debug] 6#6: *2 event timer add: 11: 60000:9766049
2019/12/13 14:37:53 [debug] 6#6: *2 reusable connection: 1
2019/12/13 14:37:53 [debug] 6#6: *2 epoll add event: fd:11 op:1 ev:80002001
2019/12/13 14:37:53 [debug] 6#6: *2 http wait request handler
2019/12/13 14:37:53 [debug] 6#6: *2 malloc: 000056473C9EF1D0:1024
2019/12/13 14:37:53 [debug] 6#6: *2 recv: eof:0, avail:-1
2019/12/13 14:37:53 [debug] 6#6: *2 recv: fd:11 541 of 1024
2019/12/13 14:37:53 [debug] 6#6: *2 reusable connection: 0
2019/12/13 14:37:53 [debug] 6#6: *2 posix_memalign: 000056473CA15D20:4096 @16
2019/12/13 14:37:53 [debug] 6#6: *2 http process request line
2019/12/13 14:37:53 [debug] 6#6: *2 http request line: "GET / HTTP/1.1"
2019/12/13 14:37:53 [debug] 6#6: *2 http uri: "/"
2019/12/13 14:37:53 [debug] 6#6: *2 http args: ""
2019/12/13 14:37:53 [debug] 6#6: *2 http exten: ""
2019/12/13 14:37:53 [debug] 6#6: *2 posix_memalign: 000056473CA09A80:4096 @16
2019/12/13 14:37:53 [debug] 6#6: *2 http process request header line
2019/12/13 14:37:53 [debug] 6#6: *2 http header: "Host: localhost"
2019/12/13 14:37:53 [debug] 6#6: *2 http header: "Connection: keep-alive"
2019/12/13 14:37:53 [debug] 6#6: *2 http header: "Cache-Control: max-age=0"
2019/12/13 14:37:53 [debug] 6#6: *2 http header: "Upgrade-Insecure-Requests: 1"
2019/12/13 14:37:53 [debug] 6#6: *2 http header: "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.79 Safari/537.36"
2019/12/13 14:37:53 [debug] 6#6: *2 http header: "Sec-Fetch-User: ?1"
2019/12/13 14:37:53 [debug] 6#6: *2 http header: "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9"
2019/12/13 14:37:53 [debug] 6#6: *2 http header: "Sec-Fetch-Site: cross-site"
2019/12/13 14:37:53 [debug] 6#6: *2 http header: "Sec-Fetch-Mode: navigate"
2019/12/13 14:37:53 [debug] 6#6: *2 http header: "Accept-Encoding: gzip, deflate, br"
2019/12/13 14:37:53 [debug] 6#6: *2 http header: "Accept-Language: fa-IR,fa;q=0.9,en-US;q=0.8,en;q=0.7"
2019/12/13 14:37:53 [debug] 6#6: *2 http header done
2019/12/13 14:37:53 [debug] 6#6: *2 event timer del: 11: 9766049
2019/12/13 14:37:53 [debug] 6#6: *2 generic phase: 0
2019/12/13 14:37:53 [debug] 6#6: *2 rewrite phase: 1
2019/12/13 14:37:53 [debug] 6#6: *2 test location: "/"
2019/12/13 14:37:53 [debug] 6#6: *2 test location: ~ "\.php$"
2019/12/13 14:37:53 [debug] 6#6: *2 using configuration "/"
2019/12/13 14:37:53 [debug] 6#6: *2 http cl:-1 max:1048576
2019/12/13 14:37:53 [debug] 6#6: *2 rewrite phase: 3
2019/12/13 14:37:53 [debug] 6#6: *2 post rewrite phase: 4
2019/12/13 14:37:53 [debug] 6#6: *2 generic phase: 5
2019/12/13 14:37:53 [debug] 6#6: *2 generic phase: 6
2019/12/13 14:37:53 [debug] 6#6: *2 generic phase: 7
2019/12/13 14:37:53 [debug] 6#6: *2 access phase: 8
2019/12/13 14:37:53 [debug] 6#6: *2 access phase: 9
2019/12/13 14:37:53 [debug] 6#6: *2 access phase: 10
2019/12/13 14:37:53 [debug] 6#6: *2 post access phase: 11
2019/12/13 14:37:53 [debug] 6#6: *2 generic phase: 12
2019/12/13 14:37:53 [debug] 6#6: *2 try files handler
2019/12/13 14:37:53 [debug] 6#6: *2 http script var: "/"
2019/12/13 14:37:53 [debug] 6#6: *2 trying to use file: "/" "/var/www/html/default/"
2019/12/13 14:37:53 [debug] 6#6: *2 http script var: "/"
2019/12/13 14:37:53 [debug] 6#6: *2 trying to use dir: "/" "/var/www/html/default/"
2019/12/13 14:37:53 [debug] 6#6: *2 try file uri: "/"
2019/12/13 14:37:53 [debug] 6#6: *2 generic phase: 13
2019/12/13 14:37:53 [debug] 6#6: *2 content phase: 14
2019/12/13 14:37:53 [debug] 6#6: *2 content phase: 15
2019/12/13 14:37:53 [debug] 6#6: *2 open index "/var/www/html/default/index.php"
2019/12/13 14:37:53 [debug] 6#6: *2 internal redirect: "/index.php?"
2019/12/13 14:37:53 [debug] 6#6: *2 rewrite phase: 1
2019/12/13 14:37:53 [debug] 6#6: *2 test location: "/"
2019/12/13 14:37:53 [debug] 6#6: *2 test location: ~ "\.php$"
2019/12/13 14:37:53 [debug] 6#6: *2 using configuration "\.php$"
2019/12/13 14:37:53 [debug] 6#6: *2 http cl:-1 max:1048576
2019/12/13 14:37:53 [debug] 6#6: *2 rewrite phase: 3
2019/12/13 14:37:53 [debug] 6#6: *2 post rewrite phase: 4
2019/12/13 14:37:53 [debug] 6#6: *2 generic phase: 5
2019/12/13 14:37:53 [debug] 6#6: *2 generic phase: 6
2019/12/13 14:37:53 [debug] 6#6: *2 generic phase: 7
2019/12/13 14:37:53 [debug] 6#6: *2 access phase: 8
2019/12/13 14:37:53 [debug] 6#6: *2 access phase: 9
2019/12/13 14:37:53 [debug] 6#6: *2 access phase: 10
2019/12/13 14:37:53 [debug] 6#6: *2 post access phase: 11
2019/12/13 14:37:53 [debug] 6#6: *2 generic phase: 12
2019/12/13 14:37:53 [debug] 6#6: *2 try files handler
2019/12/13 14:37:53 [debug] 6#6: *2 http script var: "/index.php"
2019/12/13 14:37:53 [debug] 6#6: *2 trying to use file: "/index.php" "/var/www/html/default/index.php"
2019/12/13 14:37:53 [debug] 6#6: *2 try file uri: "/index.php"
2019/12/13 14:37:53 [debug] 6#6: *2 generic phase: 13
2019/12/13 14:37:53 [debug] 6#6: *2 http init upstream, client timer: 0
2019/12/13 14:37:53 [debug] 6#6: *2 epoll add event: fd:11 op:3 ev:80002005
2019/12/13 14:37:53 [debug] 6#6: *2 http script copy: "QUERY_STRING"
2019/12/13 14:37:53 [debug] 6#6: *2 fastcgi param: "QUERY_STRING: "
2019/12/13 14:37:53 [debug] 6#6: *2 http script copy: "REQUEST_METHOD"
2019/12/13 14:37:53 [debug] 6#6: *2 http script var: "GET"
2019/12/13 14:37:53 [debug] 6#6: *2 fastcgi param: "REQUEST_METHOD: GET"
2019/12/13 14:37:53 [debug] 6#6: *2 http script copy: "CONTENT_TYPE"
2019/12/13 14:37:53 [debug] 6#6: *2 fastcgi param: "CONTENT_TYPE: "
2019/12/13 14:37:53 [debug] 6#6: *2 http script copy: "CONTENT_LENGTH"
2019/12/13 14:37:53 [debug] 6#6: *2 fastcgi param: "CONTENT_LENGTH: "
2019/12/13 14:37:53 [debug] 6#6: *2 http script copy: "SCRIPT_NAME"
2019/12/13 14:37:53 [debug] 6#6: *2 http script var: "/index.php"
2019/12/13 14:37:53 [debug] 6#6: *2 fastcgi param: "SCRIPT_NAME: /index.php"
2019/12/13 14:37:53 [debug] 6#6: *2 http script copy: "REQUEST_URI"
2019/12/13 14:37:53 [debug] 6#6: *2 http script var: "/"
2019/12/13 14:37:53 [debug] 6#6: *2 fastcgi param: "REQUEST_URI: /"
2019/12/13 14:37:53 [debug] 6#6: *2 http script copy: "DOCUMENT_URI"
2019/12/13 14:37:53 [debug] 6#6: *2 http script var: "/index.php"
2019/12/13 14:37:53 [debug] 6#6: *2 fastcgi param: "DOCUMENT_URI: /index.php"
2019/12/13 14:37:53 [debug] 6#6: *2 http script copy: "DOCUMENT_ROOT"
2019/12/13 14:37:53 [debug] 6#6: *2 http script var: "/var/www/html/default"
2019/12/13 14:37:53 [debug] 6#6: *2 fastcgi param: "DOCUMENT_ROOT: /var/www/html/default"
2019/12/13 14:37:53 [debug] 6#6: *2 http script copy: "SERVER_PROTOCOL"
2019/12/13 14:37:53 [debug] 6#6: *2 http script var: "HTTP/1.1"
2019/12/13 14:37:53 [debug] 6#6: *2 fastcgi param: "SERVER_PROTOCOL: HTTP/1.1"
2019/12/13 14:37:53 [debug] 6#6: *2 http script copy: "REQUEST_SCHEME"
2019/12/13 14:37:53 [debug] 6#6: *2 http script var: "http"
2019/12/13 14:37:53 [debug] 6#6: *2 fastcgi param: "REQUEST_SCHEME: http"
2019/12/13 14:37:53 [debug] 6#6: *2 http script copy: ""
2019/12/13 14:37:53 [debug] 6#6: *2 http script copy: "GATEWAY_INTERFACE"
2019/12/13 14:37:53 [debug] 6#6: *2 http script copy: "CGI/1.1"
2019/12/13 14:37:53 [debug] 6#6: *2 fastcgi param: "GATEWAY_INTERFACE: CGI/1.1"
2019/12/13 14:37:53 [debug] 6#6: *2 http script copy: "SERVER_SOFTWARE"
2019/12/13 14:37:53 [debug] 6#6: *2 http script copy: "nginx/"
2019/12/13 14:37:53 [debug] 6#6: *2 http script var: "1.17.6"
2019/12/13 14:37:53 [debug] 6#6: *2 fastcgi param: "SERVER_SOFTWARE: nginx/1.17.6"
2019/12/13 14:37:53 [debug] 6#6: *2 http script copy: "REMOTE_ADDR"
2019/12/13 14:37:53 [debug] 6#6: *2 http script var: "172.20.0.1"
2019/12/13 14:37:53 [debug] 6#6: *2 fastcgi param: "REMOTE_ADDR: 172.20.0.1"
2019/12/13 14:37:53 [debug] 6#6: *2 http script copy: "REMOTE_PORT"
2019/12/13 14:37:53 [debug] 6#6: *2 http script var: "51500"
2019/12/13 14:37:53 [debug] 6#6: *2 fastcgi param: "REMOTE_PORT: 51500"
2019/12/13 14:37:53 [debug] 6#6: *2 http script copy: "SERVER_ADDR"
2019/12/13 14:37:53 [debug] 6#6: *2 http script var: "172.20.0.3"
2019/12/13 14:37:53 [debug] 6#6: *2 fastcgi param: "SERVER_ADDR: 172.20.0.3"
2019/12/13 14:37:53 [debug] 6#6: *2 http script copy: "SERVER_PORT"
2019/12/13 14:37:53 [debug] 6#6: *2 http script var: "80"
2019/12/13 14:37:53 [debug] 6#6: *2 fastcgi param: "SERVER_PORT: 80"
2019/12/13 14:37:53 [debug] 6#6: *2 http script copy: "SERVER_NAME"
2019/12/13 14:37:53 [debug] 6#6: *2 http script var: "localhost"
2019/12/13 14:37:53 [debug] 6#6: *2 fastcgi param: "SERVER_NAME: localhost"
2019/12/13 14:37:53 [debug] 6#6: *2 http script copy: "REDIRECT_STATUS"
2019/12/13 14:37:53 [debug] 6#6: *2 http script copy: "200"
2019/12/13 14:37:53 [debug] 6#6: *2 fastcgi param: "REDIRECT_STATUS: 200"
2019/12/13 14:37:53 [debug] 6#6: *2 http script copy: "SCRIPT_FILENAME"
2019/12/13 14:37:53 [debug] 6#6: *2 http script var: "/var/www/html/default"
2019/12/13 14:37:53 [debug] 6#6: *2 http script var: "/index.php"
2019/12/13 14:37:53 [debug] 6#6: *2 fastcgi param: "SCRIPT_FILENAME: /var/www/html/default/index.php"
2019/12/13 14:37:53 [debug] 6#6: *2 http script copy: "PATH_INFO"
2019/12/13 14:37:53 [debug] 6#6: *2 http script var: ""
2019/12/13 14:37:53 [debug] 6#6: *2 fastcgi param: "PATH_INFO: "
2019/12/13 14:37:53 [debug] 6#6: *2 fastcgi param: "HTTP_HOST: localhost"
2019/12/13 14:37:53 [debug] 6#6: *2 fastcgi param: "HTTP_CONNECTION: keep-alive"
2019/12/13 14:37:53 [debug] 6#6: *2 fastcgi param: "HTTP_CACHE_CONTROL: max-age=0"
2019/12/13 14:37:53 [debug] 6#6: *2 fastcgi param: "HTTP_UPGRADE_INSECURE_REQUESTS: 1"
2019/12/13 14:37:53 [debug] 6#6: *2 fastcgi param: "HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.79 Safari/537.36"
2019/12/13 14:37:53 [debug] 6#6: *2 fastcgi param: "HTTP_SEC_FETCH_USER: ?1"
2019/12/13 14:37:53 [debug] 6#6: *2 fastcgi param: "HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9"
2019/12/13 14:37:53 [debug] 6#6: *2 fastcgi param: "HTTP_SEC_FETCH_SITE: cross-site"
2019/12/13 14:37:53 [debug] 6#6: *2 fastcgi param: "HTTP_SEC_FETCH_MODE: navigate"
2019/12/13 14:37:53 [debug] 6#6: *2 fastcgi param: "HTTP_ACCEPT_ENCODING: gzip, deflate, br"
2019/12/13 14:37:53 [debug] 6#6: *2 fastcgi param: "HTTP_ACCEPT_LANGUAGE: fa-IR,fa;q=0.9,en-US;q=0.8,en;q=0.7"
2019/12/13 14:37:53 [debug] 6#6: *2 http cleanup add: 000056473CA0A930
2019/12/13 14:37:53 [debug] 6#6: *2 get rr peer, try: 1
2019/12/13 14:37:53 [debug] 6#6: *2 stream socket 12
2019/12/13 14:37:53 [debug] 6#6: *2 epoll add connection: fd:12 ev:80002005
2019/12/13 14:37:53 [debug] 6#6: *2 connect to 172.20.0.2:9000, fd:12 #3
2019/12/13 14:37:53 [debug] 6#6: *2 http upstream connect: -2
2019/12/13 14:37:53 [debug] 6#6: *2 posix_memalign: 000056473C9E9690:128 @16
2019/12/13 14:37:53 [debug] 6#6: *2 event timer add: 12: 60000:9766049
2019/12/13 14:37:53 [debug] 6#6: *2 http finalize request: -4, "/index.php?" a:1, c:3
2019/12/13 14:37:53 [debug] 6#6: *2 http request count:3 blk:0
2019/12/13 14:37:53 [debug] 6#6: *2 http finalize request: -4, "/index.php?" a:1, c:2
2019/12/13 14:37:53 [debug] 6#6: *2 http request count:2 blk:0
2019/12/13 14:37:53 [debug] 6#6: *2 http run request: "/index.php?"
2019/12/13 14:37:53 [debug] 6#6: *2 http upstream check client, write event:1, "/index.php"
2019/12/13 14:37:53 [debug] 6#6: *2 http upstream request: "/index.php?"
2019/12/13 14:37:53 [debug] 6#6: *2 http upstream send request handler
2019/12/13 14:37:53 [debug] 6#6: *2 http upstream send request
2019/12/13 14:37:53 [debug] 6#6: *2 http upstream send request body
2019/12/13 14:37:53 [debug] 6#6: *2 chain writer buf fl:0 s:1040
2019/12/13 14:37:53 [debug] 6#6: *2 chain writer in: 000056473CA0A970
2019/12/13 14:37:53 [debug] 6#6: *2 writev: 1040 of 1040
2019/12/13 14:37:53 [debug] 6#6: *2 chain writer out: 0000000000000000
2019/12/13 14:37:53 [debug] 6#6: *2 event timer del: 12: 9766049
2019/12/13 14:37:53 [debug] 6#6: *2 event timer add: 12: 60000:9766059
2019/12/13 14:37:53 [debug] 6#6: *2 http upstream request: "/index.php?"
2019/12/13 14:37:53 [debug] 6#6: *2 http upstream process header
2019/12/13 14:37:53 [debug] 6#6: *2 malloc: 000056473CA0AA90:4096
2019/12/13 14:37:53 [debug] 6#6: *2 posix_memalign: 000056473CA0BAA0:4096 @16
2019/12/13 14:37:53 [debug] 6#6: *2 recv: eof:1, avail:-1
2019/12/13 14:37:53 [debug] 6#6: *2 recv: fd:12 168 of 4096
2019/12/13 14:37:53 [debug] 6#6: *2 http fastcgi record byte: 01
2019/12/13 14:37:53 [debug] 6#6: *2 http fastcgi record byte: 07
2019/12/13 14:37:53 [debug] 6#6: *2 http fastcgi record byte: 00
2019/12/13 14:37:53 [debug] 6#6: *2 http fastcgi record byte: 01
2019/12/13 14:37:53 [debug] 6#6: *2 http fastcgi record byte: 00
2019/12/13 14:37:53 [debug] 6#6: *2 http fastcgi record byte: 16
2019/12/13 14:37:53 [debug] 6#6: *2 http fastcgi record byte: 02
2019/12/13 14:37:53 [debug] 6#6: *2 http fastcgi record byte: 00
2019/12/13 14:37:53 [debug] 6#6: *2 http fastcgi record length: 22
2019/12/13 14:37:53 [error] 6#6: *2 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 172.20.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://172.20.0.2:9000", host: "localhost"
2019/12/13 14:37:53 [debug] 6#6: *2 http fastcgi record byte: 01
2019/12/13 14:37:53 [debug] 6#6: *2 http fastcgi record byte: 06
2019/12/13 14:37:53 [debug] 6#6: *2 http fastcgi record byte: 00
2019/12/13 14:37:53 [debug] 6#6: *2 http fastcgi record byte: 01
2019/12/13 14:37:53 [debug] 6#6: *2 http fastcgi record byte: 00
2019/12/13 14:37:53 [debug] 6#6: *2 http fastcgi record byte: 6B
2019/12/13 14:37:53 [debug] 6#6: *2 http fastcgi record byte: 05
2019/12/13 14:37:53 [debug] 6#6: *2 http fastcgi record byte: 00
2019/12/13 14:37:53 [debug] 6#6: *2 http fastcgi record length: 107
2019/12/13 14:37:53 [debug] 6#6: *2 http fastcgi parser: 0
2019/12/13 14:37:53 [debug] 6#6: *2 http fastcgi header: "Status: 404 Not Found"
2019/12/13 14:37:53 [debug] 6#6: *2 http fastcgi parser: 0
2019/12/13 14:37:53 [debug] 6#6: *2 http fastcgi header: "X-Powered-By: PHP/7.3.12"
2019/12/13 14:37:53 [debug] 6#6: *2 http fastcgi parser: 0
2019/12/13 14:37:53 [debug] 6#6: *2 http fastcgi header: "Content-type: text/html; charset=UTF-8"
2019/12/13 14:37:53 [debug] 6#6: *2 http fastcgi parser: 1
2019/12/13 14:37:53 [debug] 6#6: *2 http fastcgi header done
2019/12/13 14:37:53 [debug] 6#6: *2 HTTP/1.1 404 Not Found
Server: nginx/1.17.6
Date: Fri, 13 Dec 2019 14:37:53 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
X-Powered-By: PHP/7.3.12

2019/12/13 14:37:53 [debug] 6#6: *2 write new buf t:1 f:0 000056473CA0BC90, pos 000056473CA0BC90, size: 203 file: 0, size: 0
2019/12/13 14:37:53 [debug] 6#6: *2 http write filter: l:0 f:0 s:203
2019/12/13 14:37:53 [debug] 6#6: *2 http cacheable: 0
2019/12/13 14:37:53 [debug] 6#6: *2 http upstream process upstream
2019/12/13 14:37:53 [debug] 6#6: *2 pipe read upstream: 1
2019/12/13 14:37:53 [debug] 6#6: *2 pipe preread: 37
2019/12/13 14:37:53 [debug] 6#6: *2 readv: eof:1, avail:0
2019/12/13 14:37:53 [debug] 6#6: *2 readv: 1, last:3928
2019/12/13 14:37:53 [debug] 6#6: *2 pipe recv chain: 0
2019/12/13 14:37:53 [debug] 6#6: *2 pipe buf free s:0 t:1 f:0 000056473CA0AA90, pos 000056473CA0AB13, size: 37 file: 0, size: 0
2019/12/13 14:37:53 [debug] 6#6: *2 pipe length: -1
2019/12/13 14:37:53 [debug] 6#6: *2 input buf #0 000056473CA0AB13
2019/12/13 14:37:53 [debug] 6#6: *2 http fastcgi record byte: 01
2019/12/13 14:37:53 [debug] 6#6: *2 http fastcgi record byte: 03
2019/12/13 14:37:53 [debug] 6#6: *2 http fastcgi record byte: 00
2019/12/13 14:37:53 [debug] 6#6: *2 http fastcgi record byte: 01
2019/12/13 14:37:53 [debug] 6#6: *2 http fastcgi record byte: 00
2019/12/13 14:37:53 [debug] 6#6: *2 http fastcgi record byte: 08
2019/12/13 14:37:53 [debug] 6#6: *2 http fastcgi record byte: 00
2019/12/13 14:37:53 [debug] 6#6: *2 http fastcgi record byte: 00
2019/12/13 14:37:53 [debug] 6#6: *2 http fastcgi record length: 8
2019/12/13 14:37:53 [debug] 6#6: *2 http fastcgi sent end request
2019/12/13 14:37:53 [debug] 6#6: *2 input buf 000056473CA0AB13 16
2019/12/13 14:37:53 [debug] 6#6: *2 pipe write downstream: 1
2019/12/13 14:37:53 [debug] 6#6: *2 pipe write downstream flush in
2019/12/13 14:37:53 [debug] 6#6: *2 http output filter "/index.php?"
2019/12/13 14:37:53 [debug] 6#6: *2 http copy filter: "/index.php?"
2019/12/13 14:37:53 [debug] 6#6: *2 http postpone filter "/index.php?" 000056473CA0BE88
2019/12/13 14:37:53 [debug] 6#6: *2 http chunk: 16
2019/12/13 14:37:53 [debug] 6#6: *2 write old buf t:1 f:0 000056473CA0BC90, pos 000056473CA0BC90, size: 203 file: 0, size: 0
2019/12/13 14:37:53 [debug] 6#6: *2 write new buf t:1 f:0 000056473CA0BFE0, pos 000056473CA0BFE0, size: 4 file: 0, size: 0
2019/12/13 14:37:53 [debug] 6#6: *2 write new buf t:1 f:0 000056473CA0AA90, pos 000056473CA0AB13, size: 16 file: 0, size: 0
2019/12/13 14:37:53 [debug] 6#6: *2 write new buf t:0 f:0 0000000000000000, pos 000056473C934DCA, size: 2 file: 0, size: 0
2019/12/13 14:37:53 [debug] 6#6: *2 http write filter: l:0 f:0 s:225
2019/12/13 14:37:53 [debug] 6#6: *2 http copy filter: 0 "/index.php?"
2019/12/13 14:37:53 [debug] 6#6: *2 pipe write downstream done
2019/12/13 14:37:53 [debug] 6#6: *2 event timer: 12, old: 9766059, new: 9766059
2019/12/13 14:37:53 [debug] 6#6: *2 http upstream exit: 0000000000000000
2019/12/13 14:37:53 [debug] 6#6: *2 finalize http upstream request: 0
2019/12/13 14:37:53 [debug] 6#6: *2 finalize http fastcgi request
2019/12/13 14:37:53 [debug] 6#6: *2 free rr peer 1 0
2019/12/13 14:37:53 [debug] 6#6: *2 close http upstream connection: 12
2019/12/13 14:37:53 [debug] 6#6: *2 free: 000056473C9E9690, unused: 48
2019/12/13 14:37:53 [debug] 6#6: *2 event timer del: 12: 9766059
2019/12/13 14:37:53 [debug] 6#6: *2 reusable connection: 0
2019/12/13 14:37:53 [debug] 6#6: *2 http upstream temp fd: -1
2019/12/13 14:37:53 [debug] 6#6: *2 http output filter "/index.php?"
2019/12/13 14:37:53 [debug] 6#6: *2 http copy filter: "/index.php?"
2019/12/13 14:37:53 [debug] 6#6: *2 http postpone filter "/index.php?" 00007FFC7F516260
2019/12/13 14:37:53 [debug] 6#6: *2 http chunk: 0
2019/12/13 14:37:53 [debug] 6#6: *2 write old buf t:1 f:0 000056473CA0BC90, pos 000056473CA0BC90, size: 203 file: 0, size: 0
2019/12/13 14:37:53 [debug] 6#6: *2 write old buf t:1 f:0 000056473CA0BFE0, pos 000056473CA0BFE0, size: 4 file: 0, size: 0
2019/12/13 14:37:53 [debug] 6#6: *2 write old buf t:1 f:0 000056473CA0AA90, pos 000056473CA0AB13, size: 16 file: 0, size: 0
2019/12/13 14:37:53 [debug] 6#6: *2 write old buf t:0 f:0 0000000000000000, pos 000056473C934DCA, size: 2 file: 0, size: 0
2019/12/13 14:37:53 [debug] 6#6: *2 write new buf t:0 f:0 0000000000000000, pos 000056473C934DC7, size: 5 file: 0, size: 0
2019/12/13 14:37:53 [debug] 6#6: *2 http write filter: l:1 f:0 s:230
2019/12/13 14:37:53 [debug] 6#6: *2 http write filter limit 0
2019/12/13 14:37:53 [debug] 6#6: *2 writev: 230 of 230
2019/12/13 14:37:53 [debug] 6#6: *2 http write filter 0000000000000000
2019/12/13 14:37:53 [debug] 6#6: *2 http copy filter: 0 "/index.php?"
2019/12/13 14:37:53 [debug] 6#6: *2 http finalize request: 0, "/index.php?" a:1, c:1
2019/12/13 14:37:53 [debug] 6#6: *2 set http keepalive handler
2019/12/13 14:37:53 [debug] 6#6: *2 http close request
2019/12/13 14:37:53 [debug] 6#6: *2 http log handler
2019/12/13 14:37:53 [debug] 6#6: *2 free: 000056473CA0AA90
2019/12/13 14:37:53 [debug] 6#6: *2 free: 000056473CA15D20, unused: 12
2019/12/13 14:37:53 [debug] 6#6: *2 free: 000056473CA09A80, unused: 8
2019/12/13 14:37:53 [debug] 6#6: *2 free: 000056473CA0BAA0, unused: 2168
2019/12/13 14:37:53 [debug] 6#6: *2 free: 000056473C9EF1D0
2019/12/13 14:37:53 [debug] 6#6: *2 hc free: 0000000000000000
2019/12/13 14:37:53 [debug] 6#6: *2 hc busy: 0000000000000000 0
2019/12/13 14:37:53 [debug] 6#6: *2 tcp_nodelay
2019/12/13 14:37:53 [debug] 6#6: *2 reusable connection: 1
2019/12/13 14:37:53 [debug] 6#6: *2 event timer add: 11: 65000:9771059
2019/12/13 14:38:20 [debug] 6#6: *1 http wait request handler
2019/12/13 14:38:20 [debug] 6#6: *1 malloc: 000056473C9EF1D0:1024
2019/12/13 14:38:20 [debug] 6#6: *1 recv: eof:1, avail:-1
2019/12/13 14:38:20 [debug] 6#6: *1 recv: fd:3 0 of 1024
2019/12/13 14:38:20 [info] 6#6: *1 client closed connection while waiting for request, client: 172.20.0.1, server: 0.0.0.0:80
2019/12/13 14:38:20 [debug] 6#6: *1 close http connection: 3
2019/12/13 14:38:20 [debug] 6#6: *1 event timer del: 3: 9766049
2019/12/13 14:38:20 [debug] 6#6: *1 reusable connection: 0
2019/12/13 14:38:20 [debug] 6#6: *1 free: 000056473C9EF1D0
2019/12/13 14:38:20 [debug] 6#6: *1 free: 000056473C9EE7C0, unused: 136
2019/12/13 14:38:58 [debug] 6#6: *2 event timer del: 11: 9771059
2019/12/13 14:38:58 [debug] 6#6: *2 http keepalive handler
2019/12/13 14:38:58 [debug] 6#6: *2 close http connection: 11
2019/12/13 14:38:58 [debug] 6#6: *2 reusable connection: 0
2019/12/13 14:38:58 [debug] 6#6: *2 free: 0000000000000000
2019/12/13 14:38:58 [debug] 6#6: *2 free: 000056473C9EA860, unused: 120

为什么会这样,我该如何解决?

我试图从stackoverflow使用以下答案:File Not Found - Nginx in DockerDocker-compose Nginx php-fpm file not found

但是我没什么区别。任何帮助将不胜感激。

docker nginx
1个回答
0
投票

尝试将默认文件夹的内容放置在/usr/share/nginx/html。您需要在两个地方进行更改:

  • ./www/default:/usr/share/nginx/html
  • root /usr/share/nginx/html
© www.soinside.com 2019 - 2024. All rights reserved.