phpinfo正常php其他页面404

用docker部署Lnmp+redis,phalcon框架,搞了好几天,一个问题接一个问题。。。
现在的问题是phpinfo打开正常,html页面也正常,php测试脚本也能运行,phalcon模块也加载了,就是访问php页面404。。。
php,nginx都是root权限,目录全都给了777。。。
查看日志,文件没找到?

2019/01/14 12:58:34 [error] 6#6: *2 open() "/home/wwwroot/t5/main/cloud.feimarobotics.com/public/favicon.ico" failed (2: No such file or directory), client: 218.17.15.18, server: , request: "GET /favicon.ico HTTP/1.1", host: "129.211.1.18:11084"
2019/01/14 13:02:40 [error] 6#6: *3 open() "/home/wwwroot/t5/main/cloud.feimarobotics.com/public/user/login" failed (2: No such file or directory), client: 218.17.15.18, server: , request: "GET /user/login HTTP/1.1", host: "129.211.1.18:11084"

在云服务器部署的:http://129.211.1.18:11084/user/login

docker-compose.yml

# 11084 cloud.feimarobotics.com, 8080 admin.feimarobotics.com, 8081 api.feimarobotics.com

version: "3"
services:
    php:
        container_name: php_service
        image: php_service:1.0
        ports:
            - "9000:9000"
        volumes:
            - /home:/home
        networks:
            - "net1"
    nginx:
        container_name: nginx_service
        image: nginx_service:1.0
        depends_on:
            - php
        ports:
            - "11084:11084"
            - "8080:8080"
            - "8081:8081"
        volumes:
            - /home:/home
        networks:
            - "net1"
    redis:
        container_name: redis_service
        image: redis:3.0.6
        ports:
            - "6379:6379"
        volumes:
            - /home/dockerconf/redis/redis.conf:/etc/redis/redis.conf:ro
        networks:
            - "net1"
networks:
    net1:
        driver: bridge

nginx.conf

user  nginx;
worker_processes  auto;

error_log  /home/wwwlogs/error.log crit;
pid        /var/run/nginx.pid;

worker_rlimit_nofile 51200;

events {
    use epoll;
    worker_connections  51200;
    multi_accept on;
}


http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    server_names_hash_bucket_size 128;
    client_header_buffer_size 32k;
    large_client_header_buffers 4 32k;
    client_max_body_size 50m;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    tcp_nopush     on;

    keepalive_timeout  65;
    tcp_nodelay on;

    fastcgi_connect_timeout 300;
    fastcgi_send_timeout 300;
    fastcgi_read_timeout 300;
    fastcgi_buffer_size 64k;
    fastcgi_buffers 4 64k;
    fastcgi_busy_buffers_size 128k;
    fastcgi_temp_file_write_size 256k;

    gzip  on;
    gzip_min_length  1k;
    gzip_buffers     4 16k;
    gzip_http_version 1.1;
    gzip_comp_level 2;
    gzip_types     text/plain application/javascript application/x-javascript text/javascript text/css application/xml application/xml+rss;
    gzip_vary on;
    gzip_proxied   expired no-cache no-store private auth;
    gzip_disable   "MSIE [1-6]\.";

    server_tokens off;

    include /etc/nginx/conf.d/*.conf;
}
default.conf

server {

listen       11084;
#server_name  cloud.feimarobotics.com;

set $root_path '/home/wwwroot/t5/main/cloud.feimarobotics.com/public';
root $root_path;

#charset koi8-r;
access_log  /home/wwwlogs/cloud.feimarobogics.com.log main;
error_log /home/wwwlogs/cloud.feimarobotics.com.error.log error;

location / {
    root   $root_path;
    index  index.html index.htm index.php index;
}

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

location ~* ^/(css|img|js|flv|swf|download|html)/(.+)$ {
    root $root_path;
}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
#    proxy_pass   http://127.0.0.1;
#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
     root $root_path;
     fastcgi_pass   php:9000;
     fastcgi_index  index.php;
     fastcgi_split_path_info ^(.+\.php)(/.*)$;
     fastcgi_param  SCRIPT_FILENAME  /home/wwwroot/t5/main/cloud.feimarobotics.com/public$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;
#}

}

阅读 2.8k
1 个回答

phpinfo打开了,应该是你phalcon扩展 有点问题,你可以到phalcon入口 index.php 开始调试下

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题