Score:0

Trying to include phpmyadmin on nginx (ERR_EMPTY_RESPONSE)

gr flag

I'm trying to include phpmyadmin on nginx and i'm getting this error: ERR_EMPTY_RESPONSE

user user38912;
worker_processes  auto;
worker_rlimit_nofile 300000;

events {
    worker_connections  16000;
    use epoll;
    accept_mutex on;
    multi_accept on;
}

thread_pool pool_xui threads=32 max_queue=0;

http {
    include mime.types;
    default_type  application/octet-stream;
    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    reset_timedout_connection on;
    include gzip.conf;
    fastcgi_read_timeout 200;
    access_log off;
    error_log /dev/null;
    keepalive_timeout 10;
    include balance.conf;
    send_timeout 20m;    
    sendfile_max_chunk 512k;
    lingering_close off;
    aio threads=pool_xui;
    client_body_timeout 13s;
    client_header_timeout 13s;
    client_max_body_size 8m;
    proxy_buffer_size 16k;
    proxy_busy_buffers_size 24k;
    proxy_buffers 64 4k;
    proxy_max_temp_file_size 0;
    real_ip_header X-Forwarded-For;
    include realip_cdn.conf;
    include realip_cloudflare.conf;
    include realip_xui.conf;
    include limit.conf;
    limit_req_zone $binary_remote_addr zone=one:30m rate=20r/s;
    server {
        include ports/*.conf;
        include codes/*.conf;
        include ssl.conf;
        include custom.conf;
        index index.php index.html index.htm;
        try_files $uri $uri.html $uri/ @extensionless-php;
        root /home/xui/www/;
        server_tokens off;
        chunked_transfer_encoding off;
        resolver 1.1.1.1 1.0.0.1 valid=300s;
        resolver_timeout 5s;
        absolute_redirect off;

        if ($request_method !~ ^(GET|POST)$) {
            return 200;
        }

        rewrite_log on;
        rewrite ^/play/(.*)/(.*)$ /stream/auth.php?token=$1&extension=$2 break;
        rewrite ^/play/(.*)$ /stream/auth.php?token=$1 break;
        rewrite ^/key/(.*)$ /stream/key.php?token=$1 break;
        rewrite ^/movie/(.*)/(.*)/(.*)$ /stream/auth.php?username=$1&password=$2&stream=$3&type=movie break;
        rewrite ^/movie/(.*)/(.*)$ /stream/auth.php?token=$1&stream=$2&type=movie break;
        rewrite ^/series/(.*)/(.*)/(.*)$ /stream/auth.php?username=$1&password=$2&stream=$3&type=series break;
        rewrite ^/series/(.*)/(.*)$ /stream/auth.php?token=$1&stream=$2&type=series break;
        rewrite ^/subtitle/(.*)/(.*)/(.*)/(.*)$ /stream/auth.php?username=$1&password=$2&stream=$4&sid=$3&type=subtitle break;
        rewrite ^/subtitle/(.*)/(.*)/(.*)$ /stream/auth.php?username=$1&password=$2&stream=$3&type=subtitle break;
        rewrite ^/hls/(.*)$ /stream/segment.php?token=$1 break;
        rewrite ^/tsauth/(.*)$ /stream/timeshift.php?token=$1 break;
        rewrite ^/thauth/(.*)$ /stream/thumb.php?token=$1 break;
        rewrite ^/auth/(.*)$ /stream/live.php?token=$1 break;
        rewrite ^/vauth/(.*)$ /stream/vod.php?token=$1 break;
        rewrite ^/subauth/(.*)$ /stream/subtitle.php?token=$1 break;
        rewrite ^/timeshift/(.*)/(.*)/(.*)/(.*)/(.*)\.(.*)$ /stream/auth.php?username=$1&password=$2&stream=$5&extension=$6&duration=$3&start=$4&type=timeshift break;
        rewrite ^/timeshift/(.*)/(.*)/(.*)/(.*)\.(.*)$ /stream/auth.php?token=$1&stream=$4&extension=$5&duration=$2&start=$3&type=timeshift break;
        rewrite ^/thumb/(.*)/(.*)/(\d+)$ /stream/auth.php?username=$1&password=$2&stream=$3&type=thumb break;
        rewrite ^/thumb/(.*)/(\d+)$ /stream/auth.php?token=$1&stream=$2&type=thumb break;
        rewrite ^/playlist/(.*)/(.*)/(.*)$ /playlist.php?username=$1&password=$2&type=$3 break;
        rewrite ^/playlist/(.*)/(.*)$ /playlist.php?username=$1&password=$2 break;
        rewrite ^/player_api/(.*)/(.*)/(.*)$ /player_api.php?username=$1&password=$2&action=$3 break;
        rewrite ^/player_api/(.*)/(.*)$ /player_api.php?username=$1&password=$2 break;
        rewrite ^/epg/(.*)/(.*)/gz$ /epg.php?username=$1&password=$2&gzip=1 break;
        rewrite ^/epg/(.*)/(.*)$ /epg.php?username=$1&password=$2 break;
        rewrite ^/live/(.*)/(.*)/(\d+)\.(.*)$ /stream/auth.php?username=$1&password=$2&stream=$3&extension=$4&type=live break;
        rewrite ^/live/(.*)/(.*)/(\d+)$ /stream/auth.php?username=$1&password=$2&stream=$3&extension=ts&type=live break;
        rewrite ^/live/(.*)/(\d+)\.(.*)$ /stream/auth.php?token=$1&stream=$2&extension=$3&type=live break;
        rewrite ^/live/(.*)/(\d+)$ /stream/auth.php?token=$1&stream=$2&extension=ts&type=live break;
        rewrite ^/probe/(.*)$ /probe.php?data=$1 break;
        rewrite ^/(.*)/(.*)/(\d+)\.(.*)$ /stream/auth.php?username=$1&password=$2&stream=$3&extension=$4&type=live break;
        rewrite ^/(.*)/(.*)/(\d+)$ /stream/auth.php?username=$1&password=$2&stream=$3&extension=ts&type=live break;

        location = /xmltv.php {
            rewrite ^ /epg.php last;
        }
        
        location = /get.php {
            rewrite ^ /playlist.php last;
        }
        
        location = /panel_api.php {
            rewrite ^ /player_api.php last;
        }
        
        location = /streaming/live.php {
            return 302 /stream/auth.php?type=live&$args;
        }
        
        location = /streaming/rtmp.php {
            return 302 /stream/rtmp.php?$args;
        }
        
        location = /streaming/timeshift.php {
            return 302 /stream/auth.php?type=timeshift&$args;
        }
        
        location = /streaming/vod.php {
            return 302 /stream/auth.php?type=movie&$args;
        }

        location = /server/load.php {
            return 302 /c/portal.php?$args;
        }

        location ^~ /images/index.html {
            return 404;
        }
        
        location ^~ /images/admin/index.html {
            return 404;
        }
        
        location ^~ /images/enigma2/index.html {
            return 404;
        }

        location ^~ /images/ {
            # Stop executing
        }
        
        location ~ ^/status$ {
            allow 127.0.0.1;
            deny all;
            fastcgi_index index.php;
            fastcgi_pass php;
            include fastcgi_params;
            fastcgi_buffering on;
            fastcgi_buffers 96 32k;
            fastcgi_buffer_size 32k;
            fastcgi_max_temp_file_size 0;
            fastcgi_keep_conn on;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_param SCRIPT_NAME $fastcgi_script_name;
        }
        
        location /nginx_status {
            allow 127.0.0.1;
            deny all;
            stub_status on;
        }
        
        location /phpmyadmin {
                alias   /usr/share/phpmyadmin;
                index  index.php;
                fastcgi_param SCRIPT_FILENAME /usr/share/phpmyadmin/index.php;
                fastcgi_param SCRIPT_NAME /index.php;
                fastcgi_pass   php-fpm;
            }

        location ~ \.php$ {
            limit_req zone=one burst=8;
            include limit_queue.conf;
            try_files $uri =404;
            fastcgi_index index.php;
            fastcgi_pass php;
            include fastcgi_params;
            fastcgi_buffering on;
            fastcgi_buffers 128 32k;
            fastcgi_buffer_size 32k;
            fastcgi_busy_buffers_size 128k;
            fastcgi_max_temp_file_size 0;
            fastcgi_keep_conn on;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_param SCRIPT_NAME $fastcgi_script_name;
        }
        
        location @extensionless-php {
            rewrite ^(.*)$ $1.php last;
        }
    }
}
Klamber avatar
ru flag
Your other php scripts use `fastcgi_pass php;`. Do they work? Generally you provide a url to php-fpm for passing e.g `fastcgi_pass 127.0.0.1:9000;`
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.