0

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.

3
  • You are going to need to share at least some of the content of the files you mentioned. But I can sat the files names have no impact on the configuration, it's only their content, so unless the servername entry matches then they will clash with each other Commented Nov 11 at 14:58
  • 1
    Hi, subdirectory dont mean an alias, it should be test.country-radio.eu/phpmyadmin/ Commented Nov 11 at 15:22
  • I tried several times with test.country-radio.eu/but it creates always an blank screen. So I now try an solution in an sub url, but I have the problem wit my nginx conf file. Commented Nov 12 at 13:22

1 Answer 1

0

Due to the fact, that I have not get any usefull answer, I use a workaround. The phpmyadmin.test.country-radio.eu I have renamed to default, so that configuration is check first. So I can now access the phpmyadmin script.

But if anybody has an answer to my question, I am still interested to understand Nginx better.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.