Hosting Beginner Guide:ISPmanager: Integration with DNSmanager

From ISPWiki
Jump to: navigation, search

Integration between ISPmanager and DNSmanager enables to add domains that were created in ISPmanager, to DNSmanager automatically.

DNSmanager configuration

  1. Log in to DNSmanager as ns1. Note: if you log in as admin, you will need a separate name space and IP address
    Hosting Beginner Guide dns11.png
  2. Navigate to the Users module to create a new user isp (remember its password as you will need it later)
    Hosting Beginner Guide dns12.png
    • Do not select the Private name space check box

ISPmanager configuration

Integration

Log in to ISPmanager --> Integration - External name servers

Hosting Beginner Guide isp10.png

Click Add

Hosting Beginner Guide isp11.png


Click "Ок"


Name servers configuration

Navigate to Domain names

Hosting Beginner Guideisp12.png

Click Settings

A new window will open

Hosting Beginner Guide isp13.png


  • Name servers - ns1.thecompany.com. ns2.thecompany.com.
  • Administrator Email - root@thecompany.com
  • IP addresses for name servers - 172.31.223.13 185.60.134.117.

Click "Ок"

ISPmanager will add NS records for domains

  • ns1.thecompany.com/172.31.223.13
  • ns2.thecompany.com/185.60.134.117

in order to create thecompany.com in ISPmanager

Service users

Navigate to the Users module --> create a new service user

Hosting Beginner Guide isp14.png

Fill out the form

Hosting Beginner Guide isp15.png
  • Login - thecompany
  • Password - click the button to have your password randomly generated.
  • In the Access tab select the Can use SSL check box

Click Next

Hosting Beginner Guide isp16.png

Select the Create the selected objects automatically and click Next


Click Finish on the form that will open

Service domain

Navigate to the Domain names module to create the thecompany.com domain

Hosting Beginner Guide isp19.png

Click Add

Hosting Beginner Guide isp18.png
  • Owner - thecompany
  • Domain name - thecompany.com

Click Ок

Select the newly created domain and click Records to add bill.thecompany.com and isp.thecompany.com

Click Add

Hosting Beginner Guide isp21.png
  • Name - isp
  • Type - A (Internet address v4)
  • IP address - 185.60.134.117

Click Ок

Create the bill subdomain for 172.31.223.13 in the same way.

Configuring a domain for ISPmanager

Go to the WWW domains module to configure ISPmanager to be accessed at https://isp.thecompany.com/ispmgr

Hosting Beginner Guide isp23.png

Click Add

Hosting Beginner Guidee isp24.png
  • Name - isp.thecompany.com
  • Aliases - leave blank
  • Administrator E-Mail - webmaster@thecompany.com
  • Secure connection (SSL) - select the check box
  • Redirect HTTP-requests to HTTPS - select the check box
  • PHP - clear the check box

Click Ок

Once completed, select this domain, click Config, and fill out the forms as described in the Documentation

I have the following example:

#user 'thecompany' virtual host 'isp.thecompany.com' configuration file
server {
	server_name isp.thecompany.com ;
	access_log /var/www/httpd-logs/isp.thecompany.com.access.log ;
	error_log /var/www/httpd-logs/isp.thecompany.com.error.log notice;
	listen 185.60.134.117:80;
	return 301 https://$host$request_uri;
}
server {
	server_name isp.thecompany.com ;
	access_log /var/www/httpd-logs/isp.thecompany.com.access.log ;
	error_log /var/www/httpd-logs/isp.thecompany.com.error.log notice;
	listen 185.60.134.117:443;
	ssl on;
	ssl_certificate "/var/www/httpd-cert/thecompany/isp.thecompany.com.crt";
	ssl_certificate_key "/var/www/httpd-cert/thecompany/isp.thecompany.com.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://185.60.134.117: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;
  	}
 
 	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 $mgr_secret;
 	        chunked_transfer_encoding off;
 	}
}

Edit /usr/local/mgr5/etc/ispmgr.conf and add

ForwardedSecret thie3uNg

Restart ISPmanager

/usr/local/mgr5/sbin/mgrctl -m ispmgr exit