Ich habe folgende nginx Konfiguration für mehrere Stamm (html/web
Standard ist, html/pma
zusätzliche Route ist):nginx mehrere Stamm Config Problem
server {
listen 443 http2 ssl;
listen [::]:443 http2 ssl;
server_name website.com;
server_tokens off;
root /usr/share/nginx/html/web;
index index.php;
location/{
try_files $uri /index.php?$args;
}
location ^~ /pma {
root /usr/share/nginx/html;
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
So standardmäßig /html/web/index.php
geöffnet wird, jedoch website.com/pma
öffnet /html/pma/
, wo pma
ist PHPMyAdmin
.
Das Problem ist:
PHPMyAdmin Authentifizierung Formular index.php
umleitet. Daher, wenn ich meine Anmeldeinformationen schreibe, leitet es mich an /html/web/index.php
weiter! Aber sollte . Sogar Abmeldung von PHPMyAdmin Weiterleitungen zu /html/web/index.php
!
Kann jemand eine bessere Art der Konfiguration vorschlagen?
Ich benutze PMA nicht, aber haben Sie gesetzt 'PmaAbsoluteUri' Punkt zu'/pma/'? Siehe [diesen Link] (https://docs.phpmyadmin.net/en/latest/config.html#basic-settings). –
move 'index' außerhalb von' location's. http://nginx.org/en/docs/http/ngx_http_index_module.html#index – Deadooshka
@Deadooshka Hat nicht geholfen. Bearbeitet in Frage – Leeloo