(Solved) Server Rewrite Mods Not Working

worldofpcgames46668

Member
YetiShare User
Jul 28, 2017
99
20
8
Hi everyone i hope you all are fine.

I am having an issue on all of my fileservers all of a sudden.

I can upload and can download files from my file servers but when i test them in the admin panel i get this error http://prntscr.com/ltwlb0

Eventhough i have setup the nginx rewrite rules correctly here is my nginx conf file.

Code:
server {

    listen      /MyRootPath

    server_name /MyRootPath

    root        /MyRootPath

    index       index.php index.html index.htm;

    access_log  /MyRootPath

    access_log /MyRootPath

    error_log   /MyRootPath



    ssl         on;

    ssl_certificate      /MyRootPath

    ssl_certificate_key  /MyRootPath



    # handle requests to the API

    location ~ /api/v2/(.+)$ {

        if (!-e $request_filename) { rewrite ^/api/v2/(.*) /api/v2/index.php?_page_url=$1 last; }

        fastcgi_pass   127.0.0.1:9000;

        fastcgi_index  index.php;

        fastcgi_param  SCRIPT_FILENAME   $document_root$fastcgi_script_name;

        include        fastcgi_params;

    }



    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000

    location ~ \.php$ {

        if (!-e $request_filename) { rewrite ^/(.*) /index.php?_page_url=$1 last; }

        fastcgi_pass   127.0.0.1:9000;

        fastcgi_index  index.php;

        fastcgi_param  SCRIPT_FILENAME   $document_root$fastcgi_script_name;

        include        fastcgi_params;

        fastcgi_param MOD_X_ACCEL_REDIRECT_ENABLED on;

    }



    location / {

        if (!-e $request_filename) {

                rewrite ^/(.*) /index.php?_page_url=$1 last;

        }

    }



    location /files/ {

        root /MyRootPath

        internal;

    }



    # these locations would be hidden by .htaccess normally

    location /core/logs/ {

        deny all;

    }



    location ~* "/\.(htaccess|htpasswd)$" {

        deny    all;

        return  404;

    }



    location /vstats/ {

        alias   /MyRootPath

        include /MyRootPath*;

    }



    include     /etc/nginx/conf.d/phpmyadmin.inc*;

    include     /etc/nginx/conf.d/phppgadmin.inc*;

    include     /etc/nginx/conf.d/webmail.inc*;



    include     /MyRootPath

}
And my config file of the fileserver is

And most importantly when i open the homepage of my file servers i get this error in chrome http://prntscr.com/ltwn31 however downloads are working fine.

And there is nothing in the nginx error logs.

Just to hide my data i put /MyRootPath dont worry about that. This was working fine like a second ago, i didnt changed anything but now suddenly this is happening.

I have given all correct permissions to the directory also.
 
Last edited:

adam

Administrator
Staff member
Dec 5, 2009
2,046
108
63
Few things to check:

- Have you recently enabled SSL? If yes, is it enabled in the script _config.inc.php file?
- Are you using a custom theme? If yes, does the theme code exist on the file servers in the /themes/ folder?

If the above are fine, drop me an email via the ticketing system. I'm not sure if you're still in support but if it's straight forward I'll let you know.

Thanks,
Adam.
 

worldofpcgames46668

Member
YetiShare User
Jul 28, 2017
99
20
8
Few things to check:

- Have you recently enabled SSL? If yes, is it enabled in the script _config.inc.php file?
- Are you using a custom theme? If yes, does the theme code exist on the file servers in the /themes/ folder?

If the above are fine, drop me an email via the ticketing system. I'm not sure if you're still in support but if it's straight forward I'll let you know.

Thanks,
Adam.
Fixed issue by copying custom theme folder to all servers. Thank you adam :) :) :)
 
  • Like
Reactions: adam

worldofpcgames46668

Member
YetiShare User
Jul 28, 2017
99
20
8
1 thing more adam, sorry for being noisy.

I am trying to move one of my servers to another and there is around 3.8TB data in it.

I tried the Rsync command but it took 24 hours and only moved 500+ GB data, and it went even slower, i tried the MOVE file function from the admin panel and it seemed fast but its stuck on processing in the action queue i checked the new server and the files were there completely, i just 1 10 GB file, but its stuck in processing.


On the main server i have these cronjobs

Code:
0 0 * * * php /path/to/your/yetishare/admin/tasks/auto_prune.cron.php >> /dev/null 2>&1
0 0 * * * php /path/to/your/yetishare/admin/tasks/create_internal_notifications.cron.php >> /dev/null 2>&1
0 * * * * php /path/to/your/yetishare/admin/tasks/delete_redundant_files.cron.php >> /dev/null 2>&1
0 0 * * * php /path/to/your/yetishare/admin/tasks/downgrade_accounts.cron.php >> /dev/null 2>&1
*/5 * * * * php /path/to/your/yetishare/admin/tasks/process_file_queue.cron.php >> /dev/null 2>&1
0 1 * * * php /path/to/your/yetishare/admin/tasks/create_email_notifications.cron.php >> /dev/null 2>&1
And on the fileserver i have these jobs

Code:
0 3 * * * php /path/to/your/yetishare/admin/tasks/delete_redundant_files.cron.php >> /dev/null 2>&1
*/5 * * * * php /path/to/your/yetishare/admin/tasks/process_file_queue.cron.php >> /dev/null 2>&1
With actual root paths, i searched other methods and they mount the drives and the transfer files, but couldnt find a good and reliable method, if you could just give me a hint where to look.
 

adam

Administrator
Staff member
Dec 5, 2009
2,046
108
63
In my experience rsync is by far the quickest and most reliable method for moving servers. I would recommend trying that again to move the files. The script function for file moves uses http and should in theory be slower. There's also a chance of drop outs with http. Rsync will reliably move them.
 
  • Like
Reactions: cr33p