How to add new server?

joymax27104000

New Member
YetiShare User
Jun 4, 2014
131
0
0
Hi,

I have watched this video: https://yetishare.com/file_server_tutorial.html

But I still not know. Must I install yetishare script on new server before config it? If yes, how to config it, ex: mysql, domain....?

Sorry about my bad English.

Thanks for helping.
 

sukhman21

Member
YetiShare User
YetiShare Supporter
Jan 26, 2015
508
3
18
Just follow the information below and you'll be fine..

Copy all the php files in the public_html directory and follow instructions below. You dont need to copy the SQL database on the new remote server, just the files..

Code:
Direct file server requirements: PHP5.3+, Apache Mod Rewrite or Nginx, remote access to your MySQL database.

So that your direct file server can receive the uploads and process downloads, it needs a copy of the full codebase installed. Upload all the files from your main site (www.filecad.com) to your new file server. This includes any plugin files within the plugin folder.

Once uploaded, replace the /_config.inc.php file on the new file server with the one listed below. Set your database password in the file (_CONFIG_DB_PASS). We've removed it for security.

    _config.inc.php


In addition, if you're using Apache, replace the '.htaccess' on the file server with the one listed below.

    .htaccess


For Nginx users, set your rules to the same as the main server. See /___NGINX_RULES.txt for details.

Ensure the following folders are CHMOD 755 (or 777 depending on your host) on this file server:

    /files/
    /core/cache/
    /core/logs/
    /plugins/
 

joymax27104000

New Member
YetiShare User
Jun 4, 2014
131
0
0
sukhman21 said:
Just follow the information below and you'll be fine..

Copy all the php files in the public_html directory and follow instructions below. You dont need to copy the SQL database on the new remote server, just the files..

Code:
Direct file server requirements: PHP5.3+, Apache Mod Rewrite or Nginx, remote access to your MySQL database.

So that your direct file server can receive the uploads and process downloads, it needs a copy of the full codebase installed. Upload all the files from your main site (www.filecad.com) to your new file server. This includes any plugin files within the plugin folder.

Once uploaded, replace the /_config.inc.php file on the new file server with the one listed below. Set your database password in the file (_CONFIG_DB_PASS). We've removed it for security.

    _config.inc.php


In addition, if you're using Apache, replace the '.htaccess' on the file server with the one listed below.

    .htaccess


For Nginx users, set your rules to the same as the main server. See /___NGINX_RULES.txt for details.

Ensure the following folders are CHMOD 755 (or 777 depending on your host) on this file server:

    /files/
    /core/cache/
    /core/logs/
    /plugins/
1/
How about "Files" folder? Need I re-upload it to new server?

2/
Can I use Apache for main server and Nginx for fileservers?
Thanks for helping.
 

sukhman21

Member
YetiShare User
YetiShare Supporter
Jan 26, 2015
508
3
18
1/
Yes just copy all files from your server to the new fileserver there's only 2 things - Download _config.inc.php file from your admin panel and replace the _config.inc.php on your fileserver (not on primary server). and secondly - you dont have to copy all files that are inside the "files" folder, just create a empty folder on your fileserver and copy the .htaccess file in it and you should be good.

2/
yes you can use nginx for your fileservers and it should work (i havent tried it but i dont see why it wouldnt work given that your fileserver is able to connect to database on your primary server and your firewall is setup correctly.
 

joymax27104000

New Member
YetiShare User
Jun 4, 2014
131
0
0
I downloaded _config.inc.php from code setup + Set my database password in the file (_CONFIG_DB_PASS), I added IP Remote Database Access Hosts, but:

Please help, this is error:
"Failed connecting to the database with the supplied connection details. Please check the details are correct and your MySQL user has permissions to access this database."

"- Checking connectivity to the site database from the file server... Problem connecting to the main script database from your file server. Ensure the settings in /_config.inc.php are correct and that your MySQL user has privileges to connect remotely.!"

Code:
<?php

/* main configuration file for script */
define("_CONFIG_SITE_HOST_URL", "sv1.domain.com");
define("_CONFIG_SITE_FULL_URL", "sv1.domain.com");

/* database connection details */
define("_CONFIG_DB_HOST", "domain.com");
define("_CONFIG_DB_NAME", "domain_home");    /* database name */
define("_CONFIG_DB_USER", "domain_home");    /* database username */
define("_CONFIG_DB_PASS", "123456");

/* set these to the main site host if you're using direct web server uploads/downloads to remote servers */
define("_CONFIG_CORE_SITE_HOST_URL", "domain.com");
define("_CONFIG_CORE_SITE_FULL_URL", "domain.com");

define("_CONFIG_SCRIPT_VERSION", "4.1.1");    /* script version */

/* show database degug information on fail */
define("_CONFIG_DB_DEBUG", true);    /* this will display debug information when something fails in the DB - leave this as true if you're not sure */

/* server paths */
define("_CONFIG_SCRIPT_ROOT",           dirname(__FILE__));
define("_CONFIG_FILE_STORAGE_PATH",     _CONFIG_SCRIPT_ROOT . '/files/');     /* location on your server to store file uploads */

/* the url of the domain to download files from, only change if you plan on using a different domain to link to your files */
define("_CONFIG_SITE_FILE_DOMAIN",      _CONFIG_SITE_FULL_URL);  /* url without the http:// and no trailing forward slash */

/* which protcol to use, default is http */
define("_CONFIG_SITE_PROTOCOL", "http");

/* toggle demo mode */
define("_CONFIG_DEMO_MODE", false);    /* always leave this as false */

My main server are using Cpanel with MySQL, and fileservers are using MariaDB (NGINX - Centminmod)

Thanks for helping.
 

sukhman21

Member
YetiShare User
YetiShare Supporter
Jan 26, 2015
508
3
18
Try connecting to SQL remotely from your fileserver to the main server using command shell. Google for the commands to remotely connect. If this works, then something in your config file is wrong. If connecting remotely doesnt work as well, then you know it could be firewall or incorrectly setup remote SQL.
 

joymax27104000

New Member
YetiShare User
Jun 4, 2014
131
0
0
sukhman21 said:
Try connecting to SQL remotely from your fileserver to the main server using command shell. Google for the commands to remotely connect. If this works, then something in your config file is wrong. If connecting remotely doesnt work as well, then you know it could be firewall or incorrectly setup remote SQL.
Hi,
I were tested again.
If both 2 servers are using Cpanel/WHM ==>> it's working
If 1 server using Cpanel/WHM, 1 server using Centminmod ==> not working

I don't know why? Cpanel are not cheap, I can buy it for my all server. I will try sentora.
 

sukhman21

Member
YetiShare User
YetiShare Supporter
Jan 26, 2015
508
3
18
it should be compatible, i have different control panels. Like you i also have just 1 cpanel main server and rest is manual LAMP and optimized and they work great...
 

joymax27104000

New Member
YetiShare User
Jun 4, 2014
131
0
0
sukhman21 said:
it should be compatible, i have different control panels. Like you i also have just 1 cpanel main server and rest is manual LAMP and optimized and they work great...
Hello,

I have added new server (remote). Main Server is Cpanel, Fileserver is Sentora.

Now, everytime I try download or upload files from/to new remote server, my account will auto logout.

How can I fix it?

Thanks for helping.
 

sukhman21

Member
YetiShare User
YetiShare Supporter
Jan 26, 2015
508
3
18
i think multiple people are having this issue. Adam should need to look into this one.. Sorry i have no idea, all i can think of is sessions/database issue....
 

joymax27104000

New Member
YetiShare User
Jun 4, 2014
131
0
0
sukhman21 said:
i think multiple people are having this issue. Adam should need to look into this one.. Sorry i have no idea, all i can think of is sessions/database issue....
After I edit session.auto_start = 1 >> it's working