Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter ASione

    (@asione)

    I have figured it out, if you use Cloudflare turn off “rocket loader”

    rocket loader is in beta:
    Optimize all JavaScript resources on your website. No configuration required

    unfortunately it stop my javascripts from working on mysite.

    the strange thing i can’t get around is why it was only affecting the household i triggered it in and nobody else.

    Thread Starter ASione

    (@asione)

    I did, unfortunately it didn’t help. its very strange.

    Thread Starter ASione

    (@asione)

    Well i figured out how to get both phpmyadmin and wordpress to work by putting them in one conf file. so wordpress no longer downloads, but executes the php files. but if I split the wordpress location block and move it to a new conf file with a similar server block the wordpress site starts to download index.php again. unless im messing up on configuration when it comes to two server blocks im not sure what im doing wrong.

    2in1.conf

    server {
        listen 80;
        server_name 192.168.1.215;
        root /usr/share/nginx/html;
        index index.php index.html index.htm;
    
        location /db-sector {
            auth_basic "Admin Login";
            auth_basic_user_file /etc/nginx/pma_pass;
    
            location ~ \.php$ {
                try_files $uri =404;
                fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include /etc/nginx/fastcgi_params;
            }
        }
        location / {
            try_files $uri $uri/ /index.php;
                location ~ \.php$ {
                    try_files $uri =404;
                    fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
                    fastcgi_index index.php;
                    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                    include /etc/nginx/fastcgi_params;
                }
        }
    }

    but I still can’t figure out how to split both into two separate conf files.
    here is what the conf files look like when in separate conf files.

    phpmyadmin.conf

    server {
        listen 80;
        server_name 192.168.1.215;
        root /usr/share/nginx/html;
        index index.php index.html index.htm;
    
        location /db-sector {
            auth_basic "Admin Login";
            auth_basic_user_file /etc/nginx/pma_pass;
    
            location ~ \.php$ {
                try_files $uri =404;
                fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include /etc/nginx/fastcgi_params;
            }
        }
    }

    wordpress.conf

    server {
        listen 80;
        server_name 192.168.1.215;
        root /usr/share/nginx/html;
        index index.php index.html index.htm;
    
        location / {
            try_files $uri $uri/ /index.php;
                location ~ \.php$ {
                    try_files $uri =404;
                    fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
                    fastcgi_index index.php;
                    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                    include /etc/nginx/fastcgi_params;
                }
        }
    }

    Unfortunately splitting the configuration into two conf files does not seem to work and wordpress just downloads the index.php again. I would prefer if both wordpress and phpmyadmin fuctions where in seperate conf files.

    if someone could lead me to a possible solution as to why its not working or what I may be missing to get it to work it would be most appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)