V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
phper69
V2EX  ›  程序员

laravel 框架问题

  •  
  •   phper69 · 2017-01-13 10:27:43 +08:00 · 2604 次点击
    这是一个创建于 2904 天前的主题,其中的信息可能已经有所发展或是发生改变。

    laravel 项目部署在虚拟机上挂载的 windows 目录下,在虚拟机上配置 nginx 服务器,项目为什么访问不到?提示: No input file specified.

    项目拿到挂载目录外面就可以

    11 条回复    2017-01-13 15:07:32 +08:00
    phper69
        1
    phper69  
    OP
       2017-01-13 10:29:59 +08:00
    求助
    baoguok
        2
    baoguok  
       2017-01-13 10:36:40 +08:00
    没挂载到,看看 php-fpm 和 nginx 的配置部分
    phper69
        3
    phper69  
    OP
       2017-01-13 10:48:16 +08:00
    @baoguok php-fpm 的用户是 www ,之前以为是文件夹权限问题,把挂载文件夹权限改为 777 ,不行
    您指的配置会是哪块影响呢?
    techmoe
        4
    techmoe  
       2017-01-13 11:27:18 +08:00 via Android
    fpm 路径错了,找不到脚本
    老生常谈的问题。。
    phper69
        5
    phper69  
    OP
       2017-01-13 11:33:23 +08:00
    @techmoe 把项目移到挂载目录外层就可以了啊,/data/wwwroot/project , project 文件夹是挂载的 windows ,项目移到 wwwroot/下就可以,没改过配置啊
    NoobPhper
        6
    NoobPhper  
       2017-01-13 12:06:54 +08:00
    拍黄片 69
    yangqi
        7
    yangqi  
       2017-01-13 12:09:03 +08:00
    laravel 是要挂载到 laravel/public 目录下面,并不是根目录
    techmoe
        8
    techmoe  
       2017-01-13 12:16:54 +08:00 via Android
    @phper69 nginx 配置方便贴出来看一下吗
    phper69
        9
    phper69  
    OP
       2017-01-13 12:47:36 +08:00
    @techmoe

    nginx.conf

    user root root;

    worker_processes auto;

    error_log /home/wwwlogs/nginx_error.log crit;

    pid /usr/local/nginx/logs/nginx.pid;

    #Specifies the value for maximum file descriptors that can be opened by this process.
    worker_rlimit_nofile 51200;

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

    http
    {
    include 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;

    sendfile on;
    tcp_nopush on;

    keepalive_timeout 60;

    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]\.";

    #limit_conn_zone $binary_remote_addr zone=perip:10m;
    ##If enable limit_conn_zone,add "limit_conn perip 10;" to server section.

    server_tokens off;
    access_log off;

    include vhost/*.conf;
    }


    php-fpm.conf

    [global]
    pid = /usr/local/php/var/run/php-fpm.pid
    error_log = /usr/local/php/var/log/php-fpm.log
    log_level = notice

    [www]
    listen = /tmp/php-cgi.sock
    listen.backlog = -1
    listen.allowed_clients = 127.0.0.1
    listen.owner = www
    listen.group = www
    listen.mode = 0666
    user = www
    group = www
    pm = dynamic
    pm.max_children = 10
    pm.start_servers = 2
    pm.min_spare_servers = 1
    pm.max_spare_servers = 6
    request_terminate_timeout = 100
    request_slowlog_timeout = 0
    slowlog = var/log/slow.log
    phper69
        10
    phper69  
    OP
       2017-01-13 12:52:28 +08:00
    @techmoe vhost

    server
    {
    listen 80;
    #listen [::]:80;
    server_name iron.com;
    index index.html index.htm index.php default.html default.htm default.php;
    root /data/wwwroot/project/iron/public;

    include none.conf;
    #error_page 404 /404.html;
    include enable-php.conf;
    location / {
    try_files $uri $uri/ /index.php?$query_string;
    }
    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
    {
    expires 30d;
    }
    location ~ .*\.(js|css)?$
    {
    expires 12h;
    }

    location ~ /\.
    {
    deny all;
    }

    access_log /home/wwwlogs/www.blog.com.log;
    }
    abc123ccc
        11
    abc123ccc  
       2017-01-13 15:07:32 +08:00
    你可以弄一个其它页面比如 a.png ,看看能不能访问得到。如果能访问到,就是访问 PHP 配置段的问题。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3690 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 00:54 · PVG 08:54 · LAX 16:54 · JFK 19:54
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.