Hosting Beginner Guide: Configure BILLmanager address

From ISPWiki
Jump to: navigation, search

This article walks you through the steps you need to perform to access BILLmanager at https://bill.thecompany.com/billmgr, and DNSmanager and IPmanager at https://ns1.thecompany.com/

  1. Log in to the server with BILLmanager via SSH
  2. Execute yum install nginx to set up Nginx
  1. Edit /usr/local/mgr5/etc/ihttpd.conf, delete port 443
    listen {
            ip 172.31.223.13
            nochunked
            allow_origin https://mycompany.com
    }
  2. restart ihttpd - /usr/local/mgr5/sbin/ihttpd --restart
  3. edit /etc/nginx/nginx.conf - add server {} into the http{} section I have the following example:
    server {
    	server_name bill.thecompany.com ns1.thecompany.com;
    	listen 172.31.223.13:80;
    	return 301 https://$host$request_uri;
    }
    server {
    	server_name bill.thecompany.com ns1.thecompany.com;
    	listen 172.31.223.13:443;
    	ssl on;
    	ssl_certificate "/usr/local/mgr5/etc/manager.crt";
    	ssl_certificate_key "/usr/local/mgr5/etc/manager.key";
    	ssl_ciphers HIGH:!RC4:!aNULL:!eNULL:!MD5:!EXPORT:!EXP:!LOW:!SEED:!CAMELLIA:!IDEA:!PSK:!SRP:!SSLv2;
    	ssl_prefer_server_ciphers on;
    	ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
            add_header Strict-Transport-Security "max-age=31536000;";
            client_max_body_size 20m;
     
    	set $mgr_proxy "https://172.31.223.13:1500";
            set $mgr_secret "thie3uNg";
     
            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 $mgr_secret;
      		chunked_transfer_encoding off;
      	}
    }
  4. Restart nginx - systemctl restart nginx
  5. Edit /usr/local/mgr5/etc/billmgr.conf and add
     
    ForwardedSecret thie3uNg
  6. Restart BILLmanager
     /usr/local/mgr5/sbin/mgrctl -m billmgr exit

    Perform the same operations for IPmanager and DNSmanager - their shortnames are ipmgr and dnsmgr