How to enable Reseller feature

Enable reseller feature

In order to enable the reseller feature you must set the billing.reseller feature to True in settings.py file. You can do that by adding the following line at the end of the settings.py file

STAFF_FEATURES['billing.reseller'] = True

For more information see advanced settings file.

Edit nginx configuration

Next step would be edit the nginx configuration. Depending on your operating system, you might need to edit /etc/nginx/sites-enabled/your-site.conf if you’re using Ubuntu or /etc/nginx/conf.d/your-site.conf if you’re using CentOS.

If you initially installed Fleio before version 2020.05 the /reseller nginx configuration section might look differently or might be totally missing in nginx config. Add the code below.

location /reseller {
    alias /var/webapps/fleio/frontend/reseller/;
    expires -1;
    try_files $uri $uri/ /../reseller/index.html;
}

Restart services

The last step is to restart Fleio services (see Restarting Fleio) and to reload the nginx service:

service nginx reload

Upgrading Fleio from 2019.10.0 or lower

If you’re upgrading from 2019.10.0 or lower you will also need to run the following commands:

cp /var/webapps/fleio/frontend/reseller/assets/config-templates/reseller-template.config.json  /var/webapps/fleio/frontend/reseller/assets/config/reseller.config.json
sed 's|"backendApiUrl": "//localhost:8000/resellerapi|"backendApiUrl": "//REPLACE-ME/backend/resellerapi|' -i /var/webapps/fleio/frontend/reseller/assets/config/reseller.config.json
sed 's|<base href="/">|<base href="/reseller/">|' -i  /var/webapps/fleio/frontend/site/reseller/index.html

Please replace “REPLACE-ME” with your domain configured at bootstrapping.

The last step is to restart Fleio services (see Restarting Fleio) and to reload the nginx service:

service nginx reload