[操作疑難] nginx sub-directory??

# multi directory
    location /go {
    alias /var/www/go/;
    autoindex on;
    fastcgi_index index.php;
    #try_files $uri $uri/ /index.html index.php;
    #index  index.html index.htm index.php;
    }
請問各位CHING
個設定少左D咩啊
php都讀唔到,空白一片, list directory就ok
thanks

你有無試PHPINFO?

TOP

你都無 fastcgi php 去 handle php files,只係 set 咗 slash end 無嘢時 append 個 index.php 上去:

http://nginx.org/en/docs/http/ng ... .html#fastcgi_index

最重要係 pass php files 去個 fastcgi php:

http://nginx.org/en/docs/http/ng ... e.html#fastcgi_pass

Distribution default 跟嚟有成個 php block,uncomment 咗佢改少少就 work

TOP

回覆 1# carlkyo


php-fpm?

TOP

你都無 fastcgi php 去 handle php files,只係 set 咗 slash end 無嘢時 append 個 index.php 上去:



...
keaniny 發表於 2015-2-12 00:47


整左fastcgi_param SCRIPT_FILENAME /var/www/html$fastcgi_script_name;   
thanks

TOP