XFileSharing Pro - [Help] Extra File-Server Installation

Message
Author
Timmy
Posts: 146
Joined: Feb 10, 2010 8:17 pm

[Help] Extra File-Server Installation

#1 Postby Timmy » Dec 14, 2010 6:56 pm

Hello guys,

Can someone help me please?
I am trying to install a extra file server but when I try to add the new server, I receive this error:
File Server tests:
api.cgi: ERROR (

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
)
upload.cgi: ERROR (problems with link)

htdocs URL accessibility: OK
What could be?

This is my File-Server XFSConfig.pm file content:

Code: Select all

 # Directory for temporary using files, witout trailing /
 temp_dir => '/home/es2/public_html/cgi-bin/temp',

 # Directory for uploaded files, witout trailing /
 upload_dir => '/home/es2/public_html/cgi-bin/uploads',

 cgi_dir => '/home/es2/public_html/cgi-bin',

 # Path to htdocs/files folder - to generate direct links, witout trailing /
 htdocs_dir => '/home/es2/public_html/files',

 # Path to htdocs/tmp folder
 htdocs_tmp_dir => '/home/es2/public_html/tmp',

 # FileServer auth key (generating when adding server)
 fs_key => '',

 dl_key => '',

 # FileServer status
 srv_status => 'ON',

 # Your Main site URL, witout trailing /
  site_url => 'http://www.enigmashare.com',
 
  # Your Main site cgi-bin URL, witout trailing /
 site_cgi => 'http://www.enigmashare.com/cgi-bin',

 m_i => '',
  m_v => '',
  m_t => '',
  m_r => '',
  m_r_logins => '',
  mu_logins => '',
  nl_logins => '',
  hf_logins => '',
 
  bitflu_address => '127.0.0.1:4081',
This is my MAIN Server XFSConfig.pm file content:

Code: Select all

 # Directory for temporary using files, witout trailing /
 temp_dir => '/home/es1/public_html/cgi-bin/temp',

 # Directory for uploaded files, witout trailing /
 upload_dir => '/home/es1/public_html/cgi-bin/uploads',

 cgi_dir => '/home/es1/public_html/cgi-bin',

 # Path to htdocs/files folder - to generate direct links, witout trailing /
 htdocs_dir => '/home/es1/public_html/files',

 # Path to htdocs/tmp folder
 htdocs_tmp_dir => '/home/es1/public_html/tmp',

 # FileServer auth key (generating when adding server)
 fs_key => 'HIDDEN',

 dl_key => 'HIDDEN',

 # FileServer status
 srv_status => 'ON',

 # Your Main site URL, witout trailing /
 site_url => 'http://www.enigmashare.com',

 # Your Main site cgi-bin URL, witout trailing /
 site_cgi => 'http://www.enigmashare.com/cgi-bin',

 m_i => '',
 m_v => '',
 m_t => '',
 m_r => '',
 m_r_logins => '',
 mu_logins => '',
 nl_logins => '',
 hf_logins => '',

 bitflu_address => '127.0.0.1:4081',
This two fields is the same in the two files right?

Code: Select all

# Your Main site URL, witout trailing /
 site_url => 'http://www.enigmashare.com',

 # Your Main site cgi-bin URL, witout trailing /
 site_cgi => 'http://www.enigmashare.com/cgi-bin',
What I am missing?
Last edited by Timmy on Dec 15, 2010 3:04 am, edited 1 time in total.

chrda
Posts: 296
Joined: Sep 14, 2009 7:16 pm

#2 Postby chrda » Dec 14, 2010 9:37 pm

a server adminstrator :)

Timmy
Posts: 146
Joined: Feb 10, 2010 8:17 pm

#3 Postby Timmy » Dec 14, 2010 11:22 pm

What do you mean?
Can someone help me please?

Timmy
Posts: 146
Joined: Feb 10, 2010 8:17 pm

#4 Postby Timmy » Dec 15, 2010 3:46 am

I think that I solved my problem!
I chmod api.cgi to 755 and the errors disappeared.

But I have some more questions:

1- When I submitted the file-server, I received the fs_key value to add in the XFSConfig.pm but dont appeared the dl_key. Is is normal? I have that value with nothing in my XFSConfig.pm file. Its ok? Or I need to add the same value that the main server?

2- I was thinking... to add a new file-server, is required to have another domain?
Or can we just put the IP url like http://217.xx.xx.xxx/~username/ ?
If yes, how can I create a new account in WHM without fill the domain field?

3- I was transferring some files to the new server because I had all in the main server, but some files dont move...
For example, appears this:
No file 00000/rhkf135y5l82
No file 00000/zvo0d0x5783j
All Done.
It is normal?

Anturaju93
Posts: 91
Joined: May 13, 2010 6:46 pm

#5 Postby Anturaju93 » Dec 15, 2010 12:54 pm

Why don`t you you read the readme about extra files server installation? The 500 Internal server error was because you did not set cgi files to 755 (more info on readme file).
You don`t need another domain to add a new file server, just add a sub domain on your file server, add correct dns settings on file server for sub domain and on main domain dns settings for the sub domain to work. If you dont have cpanel on file server you can install and use webmin.

Timmy
Posts: 146
Joined: Feb 10, 2010 8:17 pm

#6 Postby Timmy » Dec 15, 2010 1:27 pm

Anturaju93, thank you for your reply!
I have read the install.txt file and only get this:
*** Extra File-Server Installation ***

1) Copy all files and folders from "FS-dist/cgi-bin" into FileServer cgi-bin folder.
Copy all files and folders from "FS-disr/htdocs" into FileServer htdocs (public_html) folder.

NOTE: use binary FTP mode for script files upload.

2) Chmod install_fs.cgi to 755 and run it in browser.
It will set correct permissions for other files and put correct paths into config.

3) Login with admin account and go to "Server Management" section, click "Add new server".
Put your FS cgi-bin and files URLs there, then Main server will test & update FileServer configuration.

INFO: After installation try to open env.php which is in FileServer files folder in browser - it should show you error or source code.
If you see full path, then check that you've moved .htaccess to FileServer htdocs folder.
When you make sure PHP files are forbidden, delete env.php
Executing php/cgi scripts on your server is potential vulnerability. Disable php,pl,cgi,py,sh,shtml extensions in your Site Settings.

INFO: To force file download for direct links (Save As popup in browser) you should have mod_headers Apache module enabled on your server.
Like you can see, the only file that they say to chmod 755 is install_fs.cgi...
But hey, like I said in my previous post, the problem was resolved!

About sub domain, looks a little complicated for me hehe I have cpanel and whm access but I dont understand what steps I need to do...
I saw some users topics and they saying that they are using for main server the domain www.domain.com and in the file servers they use www1.domain.com, www2.domain.com, www3.domain.com. How can I make that?

When I submitted the file-server, I received the fs_key value to add in the XFSConfig.pm but dont appeared the dl_key. Is is normal? I have that value with nothing in my XFSConfig.pm file. Its ok? Or I need to add the same value that the main server?

I was transferring some files to the new server because I had all in the main server, but some files dont move...
For example, appears this:
No file 00000/rhkf135y5l82
No file 00000/zvo0d0x5783j
All Done.
It is normal?


Thank you!

Anturaju93
Posts: 91
Joined: May 13, 2010 6:46 pm

#7 Postby Anturaju93 » Dec 15, 2010 1:51 pm

To add a subdomain on your file server follow this steps:

1. On file server, enter WHM and create a new cpanel user, like files.yourdomein.com

2. Copy all files and folders from "FS-dist/cgi-bin" into FileServer cgi-bin folder. Copy all files and folders from "FS-disr/htdocs" into FileServer htdocs (public_html) folder.

3. Login to main server cpanel and click on simple DNS zone editor from main server cpanel, then Add an A Record, like this:
Name: files.yourdomain.com
Address: extra file server IP address (where you created files.yourdomain.com)

4. Chmod install_fs.cgi to 755 and run it in browser.
It will set correct permissions for other files and put correct paths into config. Like: http://files.yourdomain.com/install_fs.cgi
If install_fs.cgi can`t set the correct file permissions just set them yourself from file server cpanel, then refresh http://files.yourdomain.com/install_fs.cgi to make sure everything is okay.

5. After everything is okay click on delete install_fs.cgi , if deletion is not possible, deleted your self from cpanel file server.

6. Now enter with admin on main site, click on servers and add the new file server like this:
Name: Server2
cgi-bin URL : http://files.yourdomain.com/cgi-bin
files URL: http://files.yourdomain.com/files

If you do everything right it should work perfect.

Some of the file can`t be transfered, click on Run DB to files consistancy check to correct this.

Timmy
Posts: 146
Joined: Feb 10, 2010 8:17 pm

#8 Postby Timmy » Dec 15, 2010 2:00 pm

thank you mate! great post! :D