Disabling ISPmanager for domain names

From ISPWiki

Jump to: navigation, search

This article walks you through the steps you need to perform to be able to access ISPmanager only by a certain domain name, such as https://isp.test/manager. For other domains alias /manager won't open ISPmanager.

It is supposed that a required domain name is not specified in configuration files of the web-server(s). We will specify all the records manually.

Only Apache is used as web-server

1. Comment the following line in the Apache configuration file

  Include /usr/local/ispmgr/etc/ispmgr.inc

2. Create the following VirtualHost in the configuration file:

  <VirtualHost ххх.ххх.ххх.ххх:80 >
          ServerName isp.test
          ServerAlias www.isp.test
          Include /usr/local/ispmgr/etc/ispmgr.inc
  </VirtualHost>

You can create the same VirtualHost for port 443.

3. Restart Apache.

If Apache + Nginx are used

1. In the /usr/local/ispmgr/etc/nginx.domain and /usr/local/ispmgr/etc/nginx.inc files change port 1500 into 81 (the port on which Apache is listening) in

set $mgr_proxy http://ххх.ххх.ххх.ххх:1500;

2. In the Nginx configuration file for the isp.test domain create a new "server" block:

       server {
               server_name isp.test www.isp.test;
               listen ххх.ххх.ххх.ххх:80;
               listen ххх.ххх.ххх.ххх:443;
               ssl on;
               ssl_certificate /usr/local/ispmgr/etc/manager.crt;
               ssl_certificate_key /usr/local/ispmgr/etc/manager.key;
               include /usr/local/ispmgr/etc/nginx.inc;
       }

3. Create the following VirtualHost in the Apache configuration file:

  <VirtualHost ххх.ххх.ххх.ххх:81 >
          ServerName isp.test
          ServerAlias www.isp.test
          Include /usr/local/ispmgr/etc/ispmgr.inc
  </VirtualHost>

4. Restart Apache and Nginx

Note. On port 1500 (ihttpd) the control panel will be accessible by any domain name, because the built-in ihttpd runs only with the control panel and sends requests to the panel. To disable this feature, you can kill the ihttpd process.

Terminate the ihttp process:

  killall ihttpd

Delete the following line in the /etc/rc.local file

  /usr/local/ispmgr/sbin/ihttpd ххх.ххх.ххх.ххх 1500

Thus, ihttpd will not start automatically upon server restart.

Was this helpful? Yes | No
Views
Personal tools