WWW domain (website) — a page or group of pages that are broadcast to the Internet and are available to users by URL. The appearance and content of the website are formed from its source files. When you add a WWW domain, a domain name is automatically created for it. Read more in Create a domain name.

Before creating a WWW domain, set up a web server in the control panel. Read more in Install a web-server.

To add a WWW domain to ISPmanager, enter Sites Create website button → select the settings mode:

  • Basic settings — you specify only the basic settings. Other settings will use default values;
  • Advanced settings — you specify all site settings.

Note

We do not recommend creating more than 100 WWW domains for the ISPmanager Host control panel to work properly.

Basic settings


To create a site in the basic settings mode:

  1. Specify the Domain name — the name by which users will access the website.
  2. Specify the root Website directory relative to the owner's home directory. Files of the website will be stored in this directory.
  3. Select the Handler for the site content:
  4. Specify the handler settings:

    For a site with PHP
    1. Select the CMS (content management system) in the Website/CMS builder field. CMS is used to fill the website with content (articles, photos, pages, etc.). Without a CMS, adding new content or changing existing content will require editing the website's source files. ISPmanager supports Drupal, Prestashop, WordPress, joomla, phpBB, BItrix, HostCMS. CMS installation is not available for sites with Node.js handler.
    2. Select the PHP mode:
      • Apache module dynamic content is processed by the PHP module of the Apache web server;
      • CGI — dynamic content is processed by Apache in CGI mode;
      • FastCGI (Apache) — dynamic content is processed by Apache in FastCGI mode;
      • FastCGI (Nginx + PHP-FPM) — PHP-FPM processes dynamic content;
      • LSAPI — PHP mode for the OpenLiteSpeed web server;
      • Not used — the website does not require PHP support.
        Read more in PHP modes.
    3. Select the required PHP version.
    For a site with Node.js
    1. Specify the Node.js version.
  5. Select from the list the Database in which the website information will be stored:

    • to Create a new database , specify its parameters:

      1. Select the Database server.
      2. Enter the Database name.
      3. Select the Database user or Create new user. To create a new user, specify its Username and Password.
    • If the website should not use the database, select Do not assign database.
      Read more in the section Databases.

  6. Press Ok.
  7. Specify the settings for a Let's Encrypt SSL certificate. If an SSL certificate is not needed for the site, uncheck Enable SSL option.

  8. Press Ok.

Advanced settings


Main settings

  1. Specify the Domain name — the name by which users will access the website.

    Comments

    A line is added to the Nginx configuration file for the WWW domain:

    Nginx configuration file

    server_name <WWW domain name>;
    BASH

    A line is added to the Apache configuration file for the WWW domain:

    Apache configuration file

    ServerName <WWW domain name>
    BASH
  2. Specify the Website aliases — additional names for accessing the website. For example, www.example.com or wiki.example.com. By default, an alias "www.<domain name>" is entered after the domain name. Resource A-records are automatically created for aliases. Read more in Resource records.

    Comments

    In the Nginx configuration file for the WWW domain, in the line

    Nginx configuration file

    server_name <WWW domain name>;
    BASH

    WWW domain aliases are added:

    Nginx configuration file

    server_name <WWW domain name> <WWW domain aliases>;
    BASH

    A line is added to the Apache configuration file for the WWW domain:

    Apache configuration file

    ServerAlias <WWW domain aliases>;
    BASH
  3. Specify the root Website directory relative to the owner's home directory. Files of the website will be stored in this directory.

    Comments

    Lines are added to the Nginx configuration file for the WWW domain:

    Nginx configuration file

    set $root_path <path to root directory>;
    root $root_path;
    BASH

    A line is added to the Apache configuration file for the WWW domain:

    Apache configuration file

    DocumentRoot <path to root directory>
    BASH
  4. Select the Handler for the site content:
  5. For a site with PHP select the CMS (content management system) in the Website/CMS builder field. CMS is used to fill the website with content (articles, photos, pages, etc.). Without a CMS, adding new content or changing existing content will require editing the website's source files. ISPmanager supports Drupal, Prestashop, WordPress, joomla, phpBB, BItrix, HostCMS.
  6. Select the SSL certificate to be used for encryption of data between the user's web browser and the website:
    • created earlier;
    • New self-signed — a free untrusted certificate. If it is used for public websites, the connection will not be considered secure;
    • New free by Let's Encrypt;

    • Not used — select this option if you are not planning to use the SSL certificate.

      Comments

      In the Nginx configuration file for the WWW domain, the second server section is created. Lines of the following form are added to it:

      Nginx configuration file

      ssl_certificate "/var/www/httpd-cert/www-root/<WWW domain name>.crt";
      ssl_certificate_key "/var/www/httpd-cert/www-root/<WWW domain name>.key";
      ssl_ciphers EECDH:+AES256:-3DES:RSA+AES:!NULL:!RC4;
      ssl_prefer_server_ciphers on;
      ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
      ssl_dhparam /etc/ssl/certs/dhparam4096.pem
      
      listen [<IP address>]:<port> ssl http2;
      BASH

      In the Apache configuration file for the WWW domain, the second server section is created. Lines of the following form are added to it:

      Apache configuration file

      SSLEngine on
      SSLCertificateFile "/var/www/httpd-cert/www-root/<WWW domain name>.crt"
      SSLCertificateKeyFile "/var/www/httpd-cert/www-root/<WWW domain name>.key"
      SSLHonorCipherOrder on
      SSLProtocol +TLSv1 +TLSv1.1 +TLSv1.2
      SSLCipherSuite EECDH:+AES256:-3DES:RSA+AES:!NULL:!RC4
      BASH
  7. Select the server IP addresses that will be assigned to the website.

    Comments

    A line is added to the Nginx configuration file for the WWW domain:

    Nginx configuration file

    listen <IP address>:<port>;
    BASH

    A line is added to the Apache configuration file for the WWW domain:

    Apache configuration file

    <VirtualHost <IP address>:<port>>
    BASH

    By default, port 80 is used for unsecured connections and 443 for secured ones.

  8. Select the Website owner — an ISPmanager user.

    Comments

    In <path to Nginx directory>/vhosts , a directory with the user's login is created. In this directory, an Nginx configuration file for the WWW domain named <WWW-domain>.conf. is created.

    In <path to Apache directory>/conf/vhosts , a directory with the user's login is created. In this directory, an Apache configuration file for the WWW domain named <WWW-domain> is created.

  9. Specify the root Website directory relative to the owner's home directory. Files of the website will be stored in this directory.

    Comments

    Lines are added to the Nginx configuration file for the WWW domain:

    Nginx configuration file

    set $root_path <path to root directory>;
    root $root_path;
    BASH

    A line is added to the Apache configuration file for the WWW domain:

    Apache configuration file

    DocumentRoot <path to root directory>
    BASH
  10. If necessary, enable the Default website option. This option is used if several websites are assigned to the same IP address and a user requests a website using an IP address or domain name that is not registered on the server with ISPmanager. In this case, the control panel will open the default website. If this option is not specified for any website, the control panel will open the website whose domain name is the first alphabetically. The punycode encoding will be used to compare Cyrillic domain names.

    Comments

    In the Nginx configuration file for the WWW domain, the line

    Nginx configuration file

    listen <IP address>:<port>;
    BASH

    is changed as follows

    Apache configuration file

    listen <IP address>:<port> default;
    BASH

    A symbolic link to the Apache configuration file for the WWW domain is created in <path to Apache directory>/conf/vhosts-default/ .

    Note

    Only one Default website can correspond to each IP address. If this option was previously enabled for a different domain, that website will no longer open by default.

Handler

If you selected the PHP handler:

  1. Select the PHP mode :
    • Apache module dynamic content is processed by the PHP module of the Apache web server;
    • CGI — dynamic content is processed by Apache in CGI mode;
    • FastCGI (Apache) — dynamic content is processed by Apache in FastCGI mode;
    • FastCGI (Nginx + PHP-FPM) — PHP-FPM processes dynamic content;
    • LSAPI — PHP mode for the OpenLiteSpeed web server;
    • Not used — the website does not require PHP support.
  2. Select the required PHP version .

Read more in PHP modes.


If you selected the Node.js handler:

  1. Specify the Node.js version. The version will be installed only for the user who owns the website. The latest version of Node.js and LTS versions starting with 12.13.0 are available.

  2. Select Connection method:

    • Socket file — Node.js application will use Unix sockets to run;
    • Port — Node.js application will use the TCP port to run.

      Comments

      ISPmanager will automatically select a free TCP port for Node.js. The search for a free port starts with the value specified in the NodeJsBackendBind parameter of the ISPmanager configuration file. Default value of the parameter — 127.0.0.1:10000.

      The directory /var/www/<user_name>/data/nodejs/ will be created to run Node.js through a Unix socket.

Database settings

Select from the list the Database in which the website information will be stored. To Create a new database , specify its parameters:

  1. Select the Database server .
  2. Enter the Database name .
  3. Select the Database user or Create new user . To create a new user, specify its Username and Password .

If the website should not use the database, select Do not assign database .

Read more in the section Databases.

Optimization and DDoS protection

  1. If you are using an Nginx web server, select the Compression level of static content on the website. Static content is files that rarely change: images, sounds, music, videos, etc. Such files, as a rule, occupy a large volume and slow down loading of the website. File compression reduces the time it takes for users to load the website. The compression level can be set from 1 to 9. The recommended value is 5. To prevent the web server from compressing static content, select level 0.

    To enable static content compression for the OpenLiteSpeed web server, enable the Сompression option. The compression level for OpenLiteSpeed is not configurable.

    Comments

    In the Nginx configuration file for the WWW domain, lines in the following format are added:

    Nginx configuration file

    gzip on;
    gzip_comp_level <compression level>;
    gzip_disable "msie6";
    gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript
    BASH

    Read more in Enable compression.

  2. To cache the website content, enable the Cache configuration option. When caching, the result of slow operations, which are performed when opening the website, is stored for a given period of time. The website is accelerated by showing users pre-saved data. However, if the cached content on the website changes, users will receive the old data until the cache expires. To configure the cache settings, specify the Cache period and the Period value . For example, 2 hours.

    Comments

    In the Nginx configuration file for the WWW domain in the location section for static files

    Nginx configuration file

    location / {
            location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
                try_files $uri $uri/ @fallback;
            }
    BASH

    a line is added:

    Nginx configuration file

    expires <caching time>;
    BASH

    For example:

    Nginx configuration file

    location / {
            location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
                expires 2h;
                try_files $uri $uri/ @fallback;
            }
    BASH
  3. For the web server to use the PageSpeed Module for website pages, enable the PageSpeed Module option. The module automatically optimizes website pages and speeds up their loading. 

    Пояснения

    In the Apache configuration file for the WWW domain, lines in the following format are added:

    <IfModule pagespeed_module>
        ModPagespeed on
    </IfModule>
    CODE

    In the Nginx configuration file for the WWW domain, line in the following format is added:

    include /etc/nginx/modules-includes/pagespeed/*.conf;
    CODE

    This string connects the configuration file /etc/nginx/modules-includes/pagespeed/pagespeed.conf with the following content:

    pagespeed on;
    
    location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" {
      add_header "" "";
    }
    location ~ "^/pagespeed_static/" { }
    location ~ "^/ngx_pagespeed_beacon$" { }
    CODE

    Read more in the article PageSpeed Module.

  4. If you are using an Nginx or OpenLiteSpeed web server, you can Enable DDoS protection. Nginx completely blocks access to the server from the IP address, while OpenLiteSpeed limits bandwidth for the IP address. Read more in DDoS protection . Specify the protection parameters:

    • Nginx:
      1. Number of Requests per second from one IP address — if this parameter is exceeded, the IP address is blocked for 5 minutes.
      2. Maximum peak attack size — the number of requests per second above which new requests are blocked.
    • OpenLiteSpeed:
      1. Number of Requests per second from one IP address — if this parameter is exceeded, the bandwidth for the IP address is limited.
      2. Bandwidth, bytes/sec — the bandwidth for the IP address. The actual throughput may be slightly higher than this setting. The value will be rounded in 4 Kb increments. To not limit the speed, enter 0.

Additional settings

  1. Choose how to create Autosubdomains:

    Read more

    The option to create Autosubdomains is available if the Default website option is disabled. The function allows you to automatically create subdomains without changing the configuration. The use of autosubdomains relieves you from additional operations. Subdomains are automatically added when subdirectories are created in the root directory of the website.

    • off — do not create subdomains;
    • in a separate directory — subdomain files should be created in subdirectories /var/www/www-root/data/www/ with the name of the subdomain. For example, for the subdomain www.test.example.com with the root directory of /var/www/www-root/data/www/example.com subdomain files need to be created in /var/www/www-root/data/www/test.example.com ;

      Comments

      In the Nginx configuration file for the WWW domain, lines in the following format are added:

      Nginx configuration file

      set $root_path /var/www/www-root/data/www;
          set $subdomain <WWW domain name>;
      if ($host ~* ^((.*).<WWW domain name>;)$) {
          set $subdomain $1;
      }
      root $root_path/$subdomain;
      BASH

      A line in the following form is added to the Apache configuration file for the WWW domain:

      Apache configuration file

      VirtualDocumentRoot /var/www/www-root/data/www/%0
      BASH
    • in the domain's subdirectory — subdomain files must be created in subdirectories of the root directory of the website. For example, for the subdomain www.test.example.com with the root directory of /var/www/www-root/data/www/example.com subdomain files need to be created in /var/www/www-root/data/www/example.com/test .

      Comments

      In the Nginx configuration file for the WWW domain, lines in the following format are added:

      Nginx configuration file

      set $root_path /var/www/www-root/data/www/<WWW domain name>;
      set $subdomain "";
      if ($host ~* ^((.*).<WWW domain name>)$) {
          set $subdomain $2;
      }
      root $root_path/$subdomain;
      BASH

      A line in the following form is added to the Apache configuration file for the WWW domain:

      Apache configuration file

      VirtualDocumentRoot /var/www/www-root/data/www/<WWW domain name>/%1
      BASH

      Note

       If you select the method of creating autosubdomains "in a separate directory" or "in the domain's subdirectory", the value "*.<domain name>" is added to the Website aliases field.

  2. Specify the Administrator email address — the email address that will be displayed on the web server error pages for this website. By default, after entering the domain name, the field specifies the mailbox webmaster@<domain name>.

    Comments

    A line is added to the Apache configuration file for the WWW domain:

    Apache configuration file

    ServerAdmin <Administrator's email>
    BASH
  3. To force a secure HTTPS connection when trying to open a website using the HTTP protocol, enable the Redirect HTTP-requests to HTTPS option. The option is available if an SSL certificate is connected to the website. When redirecting, the server returns a response code "301 Moved Permanently".

    Comments

    A line is added to the Nginx configuration file for the WWW domain:

    Nginx configuration file

    return 301 https://$host:443$request_uri
    BASH

    Lines are added to the Apache configuration file for the WWW domain:

    Apache configuration file

    RewriteEngine on
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
    BASH
  4. If an SSL certificate is connected to the website, change the SSL port for HTTPS connections if necessary. The default value is 443.

    Comments

    The port is specified in the Nginx configuration file for the WWW domain in the line:

    Nginx configuration file

    listen [<IP address>]:<port> ssl http2;
    BASH

    and in the Apache configuration file for the WWW domain in the line:

    Apache configuration file

    <VirtualHost <IP address>:<port>>
    BASH
  5. Select the Encoding . Encoding defines the set of characters that are used to represent the data of the website:

    • off the default value for the database will be used;
    • UTF-8 (recommended) — includes all characters of the Unicode standard, including Cyrillic.
    Comments

    A line is added to the Nginx configuration file for the WWW domain:

    Nginx configuration file

    charset <encoding>;
    BASH

    A line is added to the Apache configuration file for the WWW domain:

    Apache configuration file

    AddDefaultCharset <encoding>
    BASH

    Note

    To change the encoding list, create a file /usr/local/mgr5/etc/charset and specify the required values in it.

  6. Specify the Index page of the website. This page opens for the user who goes to the website by domain name and does not specify a particular page. For example, in case of request www.example.com , instead of www.example.com/index.php . Multiple pages can be listed in order of importance, separated by a space. If the first specified page does not exist, the second page will be checked and so on. If you do not specify index pages, the control panel will use values from the global web server settings.

    Comments

    A line is added to the Nginx configuration file for the WWW domain:

    Nginx configuration file

    index <index pages>;
    BASH

    A line is added to the Apache configuration file for the WWW domain:

    Apache configuration file

    DirectoryIndex <index pages>
    BASH
  7. To force a secure HTTPS connection when connecting to the website, enable the HSTS option. The option is available if an SSL certificate is connected to the website. Redirection works if the user's browser has already connected to the website through a secure connection and has saved the connection parameters. When redirecting, the server returns a response code "301 Moved Permanently".

    Comments

    A line is added to the Nginx configuration file for the WWW domain:

    Nginx configuration file

    add_header Strict-Transport-Security "max-age=31536000;"
    BASH

    Lines are added to the Apache configuration file for the WWW domain:

    Apache configuration file

    <IfModule headers_module>
    	Header always set Strict-Transport-Security "max-age=31536000; preload"
    </IfModule>
    BASH
  8. For the server to be able to process SSI commands, enable the SSI option. SSI (Server Side Includes) is a programming language for dynamic page building on the server before displaying them.

    Note

    The option is only available for Apache and Nginx web servers.


    Comments

    A line is added to the Nginx configuration file for the WWW domain:

    Nginx configuration file

    ssi on;
    BASH

    A line is added to the Apache configuration file for the WWW domain:

    Apache configuration file

    Options +Includes
    
    BASH
  9. Select whether to Use open_basedir for the Apache module mode of PHP:

    • option enabled — PHP scripts have access only to the root directory of the website;

    • option disabled — PHP scripts have access to all server directories.

  10.  If the site needs CGI scripts support, enable the CGI scripts option and specify the CGI script File extensions .

    Note

    The option is only available if the Apache web server is installed. Read more about installation in Install a web-server.

    Comments

    Lines are added to the Nginx configuration file for the WWW domain:

    Nginx configuration file

    location / {
        location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
            try_files $uri $uri/ @fallback;
        }
    location / {
            try_files /does_not_exists @fallback;
        }
    }
    location @fallback {
        proxy_pass http://127.0.0.1:8080;
        proxy_redirect http://127.0.0.1:8080 /;
        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-Forwarded-Port $server_port;
        access_log off;
    }
    BASH

    Lines are added to the Apache configuration file for the WWW domain:

    Apache configuration file

    ScriptAlias /cgi-bin/ /var/www/<WWW domain owner name>/data/www/<domain name>/cgi-bin/
    Options +ExecCGI
    AddHandler cgi-script <file extensions>
    BASH
  11. Select the Website logs you want to keep. Read more in Website statistics.
    • Access log — statistics on queries to the website;
    • Error log — web server error statistics for the website;
    • Do not use log — select to disable logging.
  12. Select the log Rotation period :
    • daily;
    • weekly;
    • monthly;
    • by size specify the Size, MB.
  13.  In the Store archives field, specify the number of log files that will be stored in the archived form.

    Note

    The disk space occupied by the archives is included in the website owner's quota. Read more in Set disk quotas.

    Comments

    In the Nginx configuration file for the WWW domain, lines in the following format are added:

    Nginx configuration file

    access_log /var/www/httpd-logs/<WWW domain name>.access.log;
    error_log /var/www/httpd-logs/<WWW domain name>.error.log notice;
    BASH

    Lines in the following form are added to the Apache configuration file for the WWW domain:

    Apache configuration file

    CustomLog /var/www/httpd-logs/<WWW domain name>.access.log combined
    ErrorLog /var/www/httpd-logs/<WWW domain name>.error.log
    BASH
  14. Select the Report generator that will be used to collect statistics on website traffic. The option is available if you have installed the Apache web server with the awstats or webalizer module. Read more about installation in Install a web-server. Specify the generator settings:

    1. Select the query statistics collection Period .
    2. Select the Statistics language .
    3. If necessary, enable the option Restrict access to statistics , specify the Password for access and Confirm it . The name of the website owner will be used as the username.

Editing the website settings


To edit the WWW domain settings, enter Sites → select the website → Edit button → Edit.

Note

If you change the website settings manually through the web server configuration files, a data mismatch warning will appear when you open the edit form. To apply the changes made manually, press Ok on the edit form. Read more in Manual modification of web-server configuration files.

To change the web server settings for the WWW domain, enter Sites → select the website → Configuration files button.

Note

We do not recommend changing the configuration files unless you are absolutely sure about what you are doing. Before saving the configuration, ISPmanager checks only the file syntax, and not the correctness of the settings.