Mahlzeit,
folgendes Problem stellt sich mir gerade. Das System ist Debian Lenny, darunter läuft nginx, spawn-fcgi aus der lighttpd sowie MySQL 5. Nun habe ich bislang alles soweit ohne Probleme zum laufen gekriegt.
Wenn ich jetzt jedoch die Seite aufrufe und kein URL umschreiben aktiviert habe, kommt ein 404. Der Aufruf der Seite im Browser erfolgt so: http://www.domain.eu/index.php/products.html
Wenn ich nun jedoch URL umschreiben aktiviere und die Seite wie folgt aufrufe ( http://www.domain.eu/products.html ) erscheint ebenfalls ein 404.
Jetzt kommt das interessante, wenn ich jedoch "Keine Seitenaliase verwenden" aktiviere dann funktionierts, klingt ja auch logisch, er verweist mit den rewrites ja auch auf http://www.domain.eu/index.php?id=22
Meine default config aus sites-available sieht wie folgt aus:
Da ich - gezwungenermaßen - das erste mal mit nginx Arbeite und nur mod_rewrite vom Apachen gewöhnt bin, weiß ich einfach nicht mehr weiter...Code:server { listen 80; server_name www.domain.eu; access_log /var/log/nginx/localhost.access.log; location / { root /var/www/nginx-default; index index.php index.html index.htm; if (-f $request_filename) { expires 30d; break; } if (!-e $request_filename) { rewrite ^(.*)/.html$ /index.php; expires 7d; } } location /doc { root /usr/share; autoindex on; allow 127.0.0.1; deny all; } location /images { root /usr/share; autoindex on; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root /var/www/nginx-default; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ { #proxy_pass http://127.0.0.1; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /var/www/nginx-default$fastcgi_script_name; include fastcgi_params; } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # location ~ /\.ht { deny all; } }
Vlt hat ja schon jemand nginx Erfahrung und kann mir dabei auf die Sprünge helfen
Grüße!
Lesezeichen