Hey again,
I'm replying to my own post, but I got the answer (except one minor thing). After realizing it was Apache's Multiviews enabling the clean urls automatically, I started to "google" with "nginx multiviews" ending up with this configuration:
server {
index index.php index.html;
server_name subdomain.domain.com;
access_log /var/log/nginx/subdomain.domain.access_log;
error_log /var/log/nginx/subdomain.domain.error_log warn;
root /var/www/html/subdomain.domain/view;
location ~ ^(.*)/ {
try_files $uri $uri.php $uri/ $1?$args $1.php?$args;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
}
}
It works perfectly, except "directory index". If I just enter "directory name" as the url, it does not load "index.php" (even if there is fastcgi_index index.php; set there). I would appreciate, if someone guided me a bit here, thanks!
BTW,
here's the .htaccess for Apache setting Multiviews propelly (it doesn't work just by setting Options +Multiviews):
Options +MultiViews
AcceptPathInfo ON
AddType application/x-httpd-php .php
(I'm not sure if AcceptPathInfo ON is required or not (helps with the ending /), but setting the mimetype is required).