I currently migrate from IIS to an Debian Nginx server.
The main site test.country-radio.eu works in general, but the TYPO3 part required more debugging. And for this debugging I would need PHPmyadmin.
I following an instruction, where PHPmyadmin is installed in an own subdirectory.
But if I try to access phpmyadmin.test.country-radio.eu/index.php I get an responce from TYPO3, what is not the result I want.
Because TYPO3 is in inside test.country-radio.eu and not in phpmyadmin.test.country-radio.eu.
Under /etc/nginx/sites-available I have created two files test.country-radio.eu and phpmyadmin.test.country-radio.eu. I also have generated the links for both sides in sites-enabled.
But Nginx is using the the test.country-radio.eu and not phpmyadmin.test.country.eu if I try to call in firefoxhttps://phpmyadmin.test.country-radio.eu.
I found a lot of examples for different sites, but not for my use case.
What is wrong?
Edit
the server_names are test.country-radio.eu and phpmyadmin.test.country-radio.eu and the default one is test.country-radio.eu.
Edit 2
Here the beginning of the test.country-radio.eu
server {
client_max_body_size 200M;
root /var/www/html/typo3/public/;
index index.php install.php index.html index.nginx-debian.html;
server_name hpradio.country-radio.eu;
# add_header Content-Security-Policy $csp_header;
fastcgi_buffers 16 32k;
fastcgi_buffer_size 64k;
proxy_buffer_size 256k;
proxy_buffers 4 512k;
proxy_busy_buffers_size 512k;
add_header X-debug-message "Test only" always;
##### Start HGA #####
location ~* ^/(cr|priv|phpmyadmin|test)/ {
alias /var/www/html/;
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
index index.php index.html;
location ~ \.php$ {
try_files $fastcgi_script_name =404;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/run/php/php8.4-fpm.sock;
}
}
##### End HGA #####
And here the phpmyadmin.test.country-radio.eu file.
server {
listen 80;
listen [::]:80;
server_name phpmyadmin.hpradio.country-radio.eu;
root /usr/share/phpmyadmin/;
index index.php index.html index.htm index.nginx-debian.html;
access_log /var/log/nginx/phpmyadmin_access.log;
error_log /var/log/nginx/phpmyadmin_error.log;
location / {
try_files $uri $uri/ /index.php;
}
location ~ ^/(doc|sql|setup)/ {
deny all;
}
location ~\.php$ {
try_files $fastcgi_script_name =404;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/run/php/php8.4-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}
Good to know, that the file name has no function.
servernameentry matches then they will clash with each other