Knowledge Base


Knowledge Base / XFilesharing Pro / How to ...

Using Cloudflare with XFileSharing (v.3.0+)

12/27/2018 05:15 AM
Question

Answer

Cloudflare setup guide for main server

1) Login to each of your file servers with root SSH and point the direct IP of your main server in /etc/hosts file. The records has the following format:

<your_direct_ip> <your_domain> www.<your_domain>

2) Open XFileConfig.pm and set 'accept_cf_connecting_ip' to '1'

3) Unless you're also going to apply Cloudflare setup guide for file servers, set your main server to READONLY in order to avoid upload problems (as least one working external file server is required).

Cloudflare setup guide for file servers (Advanced download mod required)

1) Add each file server's direct IP to /etc/hosts on main server:

<direct_ip> <file_server_domain>

2) Enable chunked upload in admin_settings -> Mods in order to bypass max file size limitation implied by Cloudflare.

3) Change Nginx mod from 182 to 8080 on each of your file servers in /usr/local/nginx/conf/nginx.conf, and restart Nginx

4) Add the following line in your XFileConfig.pm file:

    m_n_port => '8080',