habe mit NginX jetzt schon diverse Web apps laufen und das funktioniert auch immer gut (teilweise mit den Beispiel Konfigurationen von github).
Jetzt habe ich allerdings ein Problem bei einer Konfiguration. Mein Verzeichnis soll so aussehen:
Code: Alles auswählen
/var/www/domain.de/ (CMS Dateien)
/var/www/domain.de/tac/29562 (Web App Dateien)
/var/www/domain.de/tac/39473 (Web App Dateien)
Mein Problem ist jetzt der Zugriff über Nginx/PHP Dateien.
Code: Alles auswählen
chown -R www-data:www-data /var/www/domain
Das CMS funktioniert auch - aber die Web Apps in den Unterordnern nicht.
www.domain.de/tac/29562/index.php im Browser leitet weiter nach: www.domain.de/tac/29562/index.php/f/dashboard
Das ist soweit auch korrekt (gewollt von der Web App) aber Nginx scheint das nicht zu erkennen und gibt wohl "tac/29562/index.php/f/dashboard" an das CMS weiter.
Es soll aber /f/dashboard an /tac/29562/index.php weiter geben (bzw. diese Seite laden).
So sieht meine aktuelle Konfiguration aus:
Code: Alles auswählen
server {
server_name domain.de;
root /var/www/domain.de;
access_log /var/log/nginx/domain.de_access.log;
error_log /var/log/nginx/domain.de_error.log;
location ~ \..*/.*\.php$ {
return 403;
}
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}
location ~ ^/tac/(.+\.*)$ {
alias /var/www/domain.de/tac/$1;
try_files $uri /index.php$is_args$args;
# try_files $uri;
allow all;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_read_timeout 150;
fastcgi_intercept_errors on;
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
location / {
try_files $uri @rewrite;
}
location @rewrite {
rewrite ^ /index.php;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_read_timeout 150;
fastcgi_intercept_errors on;
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
}