Configuring BILLmanager address

From ISPWiki

Jump to: navigation, search

upon installation BILLmanager is accessible at https://ip/manager/billmgr или https://domain.com/manager/billmgr by default.

This article goes you through the steps you need to perform to configure your web-server so that BILLmanager will open at, for example, https://my.domain.com (http://my.domain.com)

We checked this procedure on Debian-6, Apache mpm-worker

You are supposed to have a server where ISPmanager is not installed and we will create a domain in the configuration files manually.

Only Apache is used as a web-server

in the Apache configuration file (/etc/apache2/apache2.conf if you run Debian) create two VirtualHosts for the domain my.domain.com.

NameVirtualHost ip:80
<VirtualHost ip:80>
       ServerName my.domain.com
       DocumentRoot /usr/local/ispmgr/bin/
       ServerAdmin admin@my.domain.com
       AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml
       AddType application/x-httpd-php-source .phps
</VirtualHost>
<VirtualHost ip:443 >
       ServerName my.domain.com
       DocumentRoot /usr/local/ispmgr/bin/
       ServerAdmin admin@my.domain.com
       AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml
       AddType application/x-httpd-php-source .phps
       SSLEngine on
       SSLCertificateFile /etc/apache2/ssl.crt/server.crt
       SSLCertificateKeyFile /etc/apache2/ssl.key/server.key
</VirtualHost>


where ip is the IP address associated with my.domain.com. This IP address should be assigned to the server interface.

If apache is configure with suexec, add "SuexecUserGroup www-data www-data" into each VirtualHost

We specified the control panel's home directory /usr/local/ispmgr/bin/ as the domain's home directory, so http://my.domain.com and https://my.domain.com will open BILLmanager.

Restart Apache to apply the changes.

/etc/init.d/apache2 restart

Nginx (port 80) + Apache (port 443)

Into the http section of the Nginx configuration file (/etc/nginx/nginx.conf) add:

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

to make a redirect to https.

Into the Apache configuration file add:

<VirtualHost ip:443 >
       ServerName my.domain.com
       DocumentRoot /usr/local/ispmgr/bin/
       ServerAdmin admin@my.domain.com
       AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml
       AddType application/x-httpd-php-source .phps
       SSLEngine on
       SSLCertificateFile /etc/apache2/ssl.crt/server.crt
       SSLCertificateKeyFile /etc/apache2/ssl.key/server.key
</VirtualHost>

Restart Apache and Nginx

/etc/init.d/apache2 restart
/etc/init.d/nginx restart

Nginx (80 and 443 port) + Apache

Add into nginx.conf:

server {
               server_name my.domain.com;
               listen ip:80;
location / {
   rewrite ^(.*)$ https://my.domain.com$1 permanent;
  }
}
server {
               server_name my.domain.com;
               listen ip:443;
               ssl on;
               location ~* ^.+.(jpg|jpeg|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?)$ {
               error_page 404 = @fallback;
               }
               location / {
                       proxy_pass http://ip:81;
                       proxy_redirect http://ip:81/ /;
                       proxy_set_header Host $host;
                       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                       proxy_set_header X-Forwarded-Proto $scheme;
                       proxy_set_header X-Real-IP $remote_addr;
               }
               location @fallback {
                       proxy_pass http://ip:81;
                       proxy_set_header Host $host;
                       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                       proxy_set_header X-Forwarded-Proto $scheme;
                       proxy_set_header X-Real-IP $remote_addr;
               }
       ssl_certificate /etc/apache2/ssl.crt/server.crt;
       ssl_certificate_key /etc/apache2/ssl.key/server.key;
}

Into apache2.conf add VirtualHost:

<VirtualHost ip:81 >
       ServerName my.domain.com
       DocumentRoot /usr/local/ispmgr/bin/
       ServerAdmin admin@my.domain.com
       AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml
       AddType application/x-httpd-php-source .phps
</VirtualHost>

where 81 is the port on which Apache listens. Execute netstat -napt | grep apache to check it

Restart Apache and Nginx.

/etc/init.d/apache2 restart
/etc/ini
Was this helpful? Yes | No
Views
Personal tools