BILLmanager 5 Documentation

Control panel URL

BILLmanager runs through the build-in ihttpd web-server by default. The web interface is available over the following address:

URL of the web interface. Port 1500
https://<server IP-address>:1500/billmgr

You can configure URL so that your control panel would be opened automatically when the domain name is used. 

There are two configuration options:

  • ihttpd
  • nginx + ihttpd

Configuring ihttpd

If you don't plan to launch any third-party web applications on your server, web server ports can be changed to 80 and 443.

ihttpd file configuration method:

ihttpd file configuration
listen {
       ip 10.10.10.10
       port 443
}       
listen {
       ip 10.10.10.10
       port 80
       redirect
}

10.10.10.10 — IP address used here as an example. Instead of this address, you need to insert a public IP address.

With this setting, ihttpd will accept connections on 80 and 443 ports. The redirect will be set from port 80 to port 443. 

After the configuration file has been changed, you must restart the server:

ihttpd service restart
service ihttpd restart

COREmanager will be accessible at https://10.10.10.10 by default. If you want to change this address, create the '/usr/local/mgr5/bin/index' file containing billmgr, so that BILLmanager can be accessed at https://10.10.10.10.

Redirect the A record to 10.10.10.10 so that BILLmanager would be accessible from a domain.

Configuring Nginx + ihttpd

If you have ISPmanager installed on the same server with BILLmanager, you must install Nginx through ISPmanager panel.

To install Nginx through ISPmanager Lite, please go to the section Settings Features, select Web-server (WWW) and click Edit.

In ISPmanager Business this web-server is installed by default.

If ISPmanager isn't installed on your server, you need to install it manually:

Install nginx on CentOS
yum install nginx
Install nginx on Debian
apt-get install nginx 

Configuring Nginx

The following records will be added into the Nginx '/etc/nginx/nginx.conf' configuration file:

nginx configuration file
server {	

       listen 10.10.10.10:443;
       server_name my.domain.com;	
       ssl on;	
       ssl_certificate /usr/local/mgr5/etc/manager.crt;	
       ssl_certificate_key /usr/local/mgr5/etc/manager.key; 	
 
       set $mgr_proxy "https://10.10.10.10:1500";         
         
       location ^~ /manimg/ { 		
              alias /usr/local/mgr5/skins/; 	
       } 	
       
       location / { 		
                proxy_pass $mgr_proxy; 		
                proxy_redirect $mgr_proxy /; 		
                proxy_set_header Host $host:$server_port; 		
                proxy_set_header X-Forwarded-For $remote_addr; 		
                proxy_set_header X-Forwarded-Proto $scheme; 		
                proxy_set_header X-Real-IP $remote_addr;                
                proxy_set_header X-Forwarded-Secret mary123;  		
                chunked_transfer_encoding off; 
 	}

 	location ^~ /mancgi/ {
	        proxy_pass $mgr_proxy;
	        proxy_redirect $mgr_proxy /;
	        proxy_set_header Host $host:$server_port;
	        proxy_set_header X-Forwarded-For $remote_addr; 
                proxy_set_header X-Forwarded-Proto $scheme;
	        proxy_set_header X-Real-IP $remote_addr;
	        proxy_set_header X-Forwarded-Secret mary123;
	        chunked_transfer_encoding off;
	}
}

If you use BILLmanager 6, add the section:

location ^~ /api2/{
   proxy_pass $mgr_proxy;
   proxy_redirect $mgr_proxy /;
   proxy_set_header Host $host:$server_port;
   proxy_set_header X-Forwarded-For $remote_addr; 
   proxy_set_header X-Forwarded-Proto $scheme;
   proxy_set_header X-Real-IP $remote_addr;
   proxy_set_header X-Forwarded-Secret mary123;
   chunked_transfer_encoding off;
	}

ForwardedSecret — if Nginx set up, this is a combination of letters and digits constituting a key that is used for checking authentication from certain IP addresses. It helps protect from invalid login attempts.

Note:

Make sure that a secret phrase from the Nginx configuration file (the proxy_set_header X-Forwarded-Secret directory) matches the phrase in BILLmanager and COREmanager configuration file (the ForwardedSecret directory).

When you create the secret phrase in the Nginx configuration file, you also need to add it in the BILLmanager and COREmanager configuration files.

Restart control panel after modifying BILLmanager configuration file:

BILLmanager restarting
/usr/local/mgr5/sbin/mgrctl -m billmgr exit

To open BILLmanager through the http protocol, create a redirect to https. To do so, add the following information to Nginx configuration file:

Redirect to https
server {
	listen 10.10.10.10:80;
	server_name my.domain.com;
	rewrite ^(.*)$ https://$server_name$1 permanent;
	}

my.domain.com is a domain name used as an example here. You should use your website domain name.

Restart Nginx:

Nginx restarting
service nginx restart

ihttpd configuration

In the ihttpd configuration file '/usr/local/mgr5/etc/ihttpd.conf' you must remove 'redirect' raw to avoid address cyclic readdressing:

The configuration file before changing:
listen {
        ip 10.10.10.10
		redirect
}
The configuration file after changing
listen {
        ip 10.10.10.10
}

COREmanager would be opened at https://10.10.10.10/ with default settings used. To change it, you need to create the '/usr/local/mgr5/bin/index' index file containing billmgr. If you have done these steps already, BILLmanager would be opened via IP address. 

Redirect the A record domain to 10.10.10.10, so that BILLmanager can be accessed through the domain name.