laravel 项目部署在虚拟机上挂载的 windows 目录下,在虚拟机上配置 nginx 服务器,项目为什么访问不到?提示: No input file specified.
项目拿到挂载目录外面就可以
1
phper69 OP 求助
|
2
baoguok 2017-01-13 10:36:40 +08:00
没挂载到,看看 php-fpm 和 nginx 的配置部分
|
3
phper69 OP @baoguok php-fpm 的用户是 www ,之前以为是文件夹权限问题,把挂载文件夹权限改为 777 ,不行
您指的配置会是哪块影响呢? |
4
techmoe 2017-01-13 11:27:18 +08:00 via Android
fpm 路径错了,找不到脚本
老生常谈的问题。。 |
5
phper69 OP @techmoe 把项目移到挂载目录外层就可以了啊,/data/wwwroot/project , project 文件夹是挂载的 windows ,项目移到 wwwroot/下就可以,没改过配置啊
|
6
NoobPhper 2017-01-13 12:06:54 +08:00
拍黄片 69
|
7
yangqi 2017-01-13 12:09:03 +08:00
laravel 是要挂载到 laravel/public 目录下面,并不是根目录
|
9
phper69 OP @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 |
10
phper69 OP @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; } |
11
abc123ccc 2017-01-13 15:07:32 +08:00
你可以弄一个其它页面比如 a.png ,看看能不能访问得到。如果能访问到,就是访问 PHP 配置段的问题。
|