BILLmanager runs through the build-in ihttpd web-server by default. The web interface is available over the following address:
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:
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:
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:
yum install nginx
apt-get install nginx
Configuring Nginx
The following records will be added into the Nginx '/etc/nginx/nginx.conf' 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.
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:
/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:
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:
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:
listen {
ip 10.10.10.10
redirect
}
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.