私は(html/web
がhtml/pma
が追加ルートで、デフォルトである)複数のルートについて、次のnginxの設定を持っている:開かれ、デフォルト/html/web/index.php
で、nginxの複数のルート設定問題
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;
}
}
のでしかしwebsite.com/pma
はどこ/html/pma/
、pma
開きますPHPMyAdmin
です。
問題がある:
PHPMyAdminの真偽の形態は、index.php
にリダイレクトします。したがって、資格情報を書き込むと、私は/html/web/index.php
にリダイレクトされます!しかし、/html/pma/index.php
する必要があります。 PHPMyAdminからのログアウトでさえ、/html/web/index.php
にリダイレクトされます!
誰かがより良い設定方法を提案できますか?
私はPMAは使用しませんが、 'PmaAbsoluteUri'を'/pma/'を指すように設定しましたか? [このリンク](https://docs.phpmyadmin.net/en/latest/config.html#basic-settings)を参照してください。 –
'index'を' location'sの外側に移動します。 http://nginx.org/en/docs/http/ngx_http_index_module.html#index – Deadooshka
@Deadooshka助けてくれませんでした。質問で編集 – Leeloo