<![CDATA[Latest posts for the topic "Cần giúp đở Nginx và FastCGI trên Ubuntu 14 + No input file specifi"]]> /hvaonline/posts/list/24.html JForum - http://www.jforum.net Cần giúp đở Nginx và FastCGI trên Ubuntu 14 + No input file specifi No input file specified. Cụ thể : Code:
2014/09/21 15:11:48 [error] 12849#0: *4 FastCGI sent in stderr: "PHP message: PHP Warning:  Unknown: failed to open stream: Success in Unknown on line 0
Unable to open primary script: /usr/share/nginx/html/xxx/ (Success)" while reading response header from upstream, client: 111.111.111.111, server: xxx.com.vn, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "xxx.com.vn"
Em đã tham khảo nhưng http://nginxlibrary.com/resolving-no-input-file-specified-error/ nhưng vẫn thấy mình không thuộc trường hợp nào cả : Nginx version : Code:
nginx version: nginx/1.4.6 (Ubuntu)
Additional .ini files parsed Code:
/etc/php5/fpm/conf.d/05-opcache.ini, /etc/php5/fpm/conf.d/10-pdo.ini, /etc/php5/fpm/conf.d/20-apcu.ini, /etc/php5/fpm/conf.d/20-curl.ini, /etc/php5/fpm/conf.d/20-gd.ini, /etc/php5/fpm/conf.d/20-json.ini, /etc/php5/fpm/conf.d/20-mcrypt.ini, /etc/php5/fpm/conf.d/20-memcached.ini, /etc/php5/fpm/conf.d/20-mysql.ini, /etc/php5/fpm/conf.d/20-mysqli.ini, /etc/php5/fpm/conf.d/20-pdo_mysql.ini, /etc/php5/fpm/conf.d/20-readline.ini, /etc/php5/fpm/conf.d/30-phalcon.ini
Nginx config : Code:
user www-data;
worker_processes 8;
pid /run/nginx.pid;

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

http {
        ##
        # Tuning  Settings
        ##

        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 30;
        keepalive_requests 100000;
        reset_timedout_connection on;
        client_body_timeout 10;
        send_timeout 2;

        types_hash_max_size 2048;
        server_tokens off;
        error_log /var/log/nginx/error.log crit;

        open_file_cache max=200000 inactive=20s; 
        open_file_cache_valid 30s; 
        open_file_cache_min_uses 2;
        open_file_cache_errors on;
        access_log off;


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


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


        include /etc/nginx/conf.d/*.conf;
        include /etc/nginx/sites-enabled/*;
}
Host config in site-enables : Code:
server {
        listen 80;
        root /usr/share/nginx/html/xxx/home;
        index index.php index.html index.htm;
        charset utf-8;
        server_name xxx.com.vn;


    gzip on;
    gzip_types
        text/plain
        text/css
        text/javascript
        text/xml
        image/x-icon
        image/png
        image/gif
        image/jpeg
        image/jpg 
        image/svg+xml
        application/x-javascript
        application/xml
        application/xml+rss
        application/x-font-ttf
        application/x-font-truetype
        application/x-font-opentype
        application/font-woff
        application/vnd.ms-fontobject
        application/octet-stream; 
    
    server_tokens off;
    access_log off;
    add_header Access-Control-Allow-Origin *;


        try_files $uri $uri/ @rewrite;

            location @rewrite {
                rewrite ^/(.*)$ /index.php?_url=/$1;
                }

                location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|js|xml|svg|eot|ttf|woff)$ {
                 log_not_found off;
                expires max;
                }





        location ~ \.php$ {
                try_files  $uri =404;
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
                include fastcgi_params;
                fastcgi_param PATH_INFO $fastcgi_path_info;
                        fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
                        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                        fastcgi_param SCRIPT_NAME $fastcgi_script_name;

        }

          location ~ /\.ht {
                log_not_found off;
                deny all;
        }

}
Em cũng đã chmod -R 755 và chown www-data:www-data thư mục home. Rất mong nhận được sự giúp đỡ]]>
/hvaonline/posts/list/45835.html#281715 /hvaonline/posts/list/45835.html#281715 GMT
Cần giúp đở Nginx và FastCGI trên Ubuntu 14 + No input file specifi /hvaonline/posts/list/45835.html#281725 /hvaonline/posts/list/45835.html#281725 GMT