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 .

To add a WWW domain to ISPmanager, enter Domains → WWW-domains → Add button and specify the parameters.

Main settings


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

    Details

    The following string is added into the Nginx configuration file for the WWW-domain:

    Nginx configuration file

    server_name <WWW-domain name>;
    BASH

    The following string is added into the Apache configuration file for the WWW-domain:

    Apache configuration file

    ServerName <WWW-domain name>
    BASH
  2. Specify the domain 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 .

    Details

    The following string is added into the Nginx configuration file for the WWW-domain:

    Nginx configuration file

    server_name <WWW-domain name>;
    BASH

    aliases of the WWW-domain are added:

    Nginx configuration file

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

    The following string is added into the Apache configuration file for the WWW-domain:

    Apache configuration file

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

    Details

    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 a content management system (CMS) in the Select a script 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 CMS Drupal, Prestashop, WordPress, joomla, phpBB.

  5. Select the website Owner — an ISPmanager user.

    Details

    A directory with the username is created in <path to the Nginx directory>/vhosts. The directory contains the Nginx configuration file <WWW-domain>.conf for the WWW-domain.

    A directory with the username is created in <path to the Apache directory>/conf/vhosts. The directory contains the Apache configuration file <WWW-domain> for the WWW-domain.

  6. Select an IP-addresses that will be assigned to the website. You can select an IP address from the list of IPs in Cluster settings → IP addresses.

    Details

    The following string is added into the Nginx configuration file for the WWW-domain:

    Nginx configuration file

    listen <IP address>:<port>;
    BASH

    The following string is added into the Apache configuration file for the WWW-domain:

    Apache configuration file

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

    Port 80 is used per default for an insecure connection and port 443 is used for a secure one.

  7. 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>.

    Details

    The following string is added into the Apache configuration file for the WWW-domain:

    Apache configuration file

    ServerAdmin <Administrator email>
    BASH
  8. 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.

      Details

      The following string is added into the Nginx configuration file for the WWW-domain:

      Nginx configuration file

      charset <encoding>;
      BASH

      The following string is added into the Apache configuration file for the WWW-domain:

      Apache configuration file

      AddDefaultCharset <encoding>
      BASH

      Note

      To modify a list of encodings create the /usr/local/mgr5/etc/charset file and enter the required values.

  9. 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.

    Details

    The following string is added into the Nginx configuration file for the WWW-domain:

    Nginx configuration file

    index <index pages>;
    BASH

    The following string is added into the Apache configuration file for the WWW-domain:

    Apache configuration file

    DirectoryIndex <index pages>
    BASH
  10. To secure data transmitted between the user's browser and the site:
    1. Enable the Secure connection (SSL) option. You will need to install an SSL certificate on the website.

      Details

      The second section server is created in the Nginx configuration file of the WWW-domain. The section contains the following strings:

      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

      The second section server is created in the Apache configuration file of the WWW-domain. The section contains the following strings:

      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
    2. Configure the secure connection settings:

      1. 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".

        Details

        The following string is added into the Nginx configuration file for the WWW-domain:

        Nginx configuration file

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

        The following strings are added into 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
      2. 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".

        Details

        The following string is added into the Nginx configuration file for the WWW-domain:

        Nginx configuration file

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

        The following strings are added into 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
      3. Change the SSL port for HTTPS connections if necessary. The default value is 443.

        Details

        The port is specified in the Nginx configuration file of the WWW-domain:

        Nginx configuration file

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

        and in the Apache configuration file of the WWW-domain:

        Apache configuration file

        <VirtualHost <IP address>:<port>>
        BASH
      4. Select an SSL certificate that encrypts information transmitted between a user browser and a website.
        • New self-signed — a free self-signed SSL certificate that is not trusted by browsers. When you open a website with a self-signed certificate, the browser will display a security alert.
        • Let's Encrypt certificate — a free trusted SSL certificate.
        Read more in SSL certificates.
  11. Enable the Nginx-proxy option to redirect requests to user applications (such as phpMyAdmin, phpPGAdmin, Roundcube).

    Note

    Before you start, you need to install an SSL certificate.

    Enter the following parameters:

    1. Enter the Nginx-proxy IP-address from the list in Cluster settings → IP-addresses.
    2. To open ISPmanager when redirecting, enable the Proxy requests to panel option. If the option is disabled, the redirect will open the site content by domain name.

    Read more in Nginx-proxy.

  12. 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.

    Details

    The following string is added into the Nginx configuration file for the WWW-domain:

    Nginx configuration file

    ssi on;
    BASH

    The following string is added into the Apache configuration file for the WWW-domain:

    Apache configuration file

    Options +Includes 
    BASH
  13. If necessary, enable the Priority 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 priority 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.

    Details

    The following string in the Nginx configuration file for the WWW-domain

    Nginx configuration file

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

    will be changed into

    Apache configuration file

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

    In <path to the Apache directory>/conf/vhosts-default/ a symlink to the Apache configuration file for the WWW-domain is created.

    Note

    Only one Priority website can correspond to each IP address. If this option was previously enabled for a different domain, that site will no longer be a priority.

  14. If necessary, enable the Assign to technical domain option. If this option is enabled, the site will open when requested by the address of the technical domain. Only one user site can be linked to a technical domain at a time.
  15. Specify an arbitrary Comment for the WWW domain. It will be displayed in the WWW domain list in the Comment column.
  16. If necessary, Enable DDoS protection. The protection completely blocks access to the server for IP addresses from which a large number of requests come. Read more in DDoS protection.

 


Additional features


  1. Choose how to create Autosubdomains :

    Details

    The option to create Autosubdomains is available if the Priority 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.

    1. off — do not create subdomains;
    2. 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 ;

      Details

      The following strings are added into the Nginx configuration file for the WWW-domain:

      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

      The following string is added into the Apache configuration file for the WWW-domain:

      Apache configuration file

      VirtualDocumentRoot /var/www/www-root/data/www/%0
      BASH
    3. 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 .

      Details

      The following strings are added into the Nginx configuration file for the WWW-domain:

      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

      The following string is added into 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 Aliases field.

    Note

    You can select Auto-subdomains provided that the Default option is disabled for the domain.

  2. To enable support of PHP scripts for the website:
    1. Enable the PHP option.
    2. Select a 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.
    3. 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.

    4. Select a PHP (CGI) version for "CGI" and "FastCGI (Apache)".
  3. To enable CGI-scripts for the website select the CGI-scripts checkbox and File extensions for the CGI-scripts.

    Details

    The following strings is added into 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

    The following string is added into the Apache configuration file for the WWW-domain:

    Apache configuration file

    ScriptAlias /cgi-bin/ /var/www/<WWW-domain owner>/data/www/<domain name>/cgi-bin/ Options +ExecCGI AddHandler cgi-script <file extensions>
    BASH

    Note

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

Logs settings


  1. 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;
  2. Select the log Rotation period :
    • daily;
    • weekly;
    • monthly;
    • by size specify the Size, MB.
  3. 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 Setting disk quotas.

    Details

    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
  4. Select the Analyzer that will be used to collect statistics on website traffic. Specify the analyzer 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 Re-enter it . The name of the website owner will be used as the username.

 


Website optimization


Website optimization allows improving your website performance. This option is available only for Nginx.

  1. Enable the Compression (GZIP) option to compress static content. 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. Read more in Enable compression.

    Details

    The following strings are added into the Nginx configuration file for the WWW-domain:

    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


  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 Cache duration . For example, 2 hours.

    Details

    The location section of 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; }
    BASH

    contains the string:

    Nginx configuration file

    expires <caching period>;
    BASH

    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

DDoS-protection


If you have Enabled DDoS protection, specify the protection parameters:

  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.

    Details

    The ngx_http_limit_req_module module allows limiting the rate of requests by the specified key or requests from a certain IP address. Read more in DDoS protection.

Editing the website settings


To edit the WWW domain settings, enter Domains WWW-domains 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 Domains → WWW-domains → 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.