Install a web-server
A web-server handles user requests to websites on the server with ISPmanager.
ISPmanager supports the following web-servers:
- Nginx — handles static content;
- Apache — handles static and dynamic content;
- OpenLiteSpeed — handles static and dynamic content.
We recommend using Nginx and Apache servers together. Apache’s .htaccess file gives it an edge for those in need of shared hosting, while Nginx has the upper hand with dynamic content and more elaborate features.
Web-servers can work with several WWW-domains on a single IP address. To do so Apache and OpenLiteSpeed use virtual hosts (VirtualHost) and Nginx uses several sections server in the configuration file. The configuration files of the web-servers contain all parameters for website management. Those parameters are configured according to the information specified for a WWW-domain. Learn more in Add a website.
OpenLiteSpeed installation specifics
OpenLiteSpeed cannot be installed with other web servers.
Some Apache and Nginx settings are not compatible with OpenLiteSpeed. If you have websites using Apache or Nginx, back up the website configuration files before installing OpenLiteSpeed. This will reset the websites to their original state if they do not work correctly with OpenLiteSpeed.
When moving to OpenLiteSpeed, there may be problems if the following is true for the website:
- the .htaccess file is used. OpenLiteSpeed will ignore all directives except those described in the documentation to the Apache mod_rewrite module;
- custom configuration file templates are used. Templates for OpenLiteSpeed will need to be created separately;
- configuration files have been changed. These changes need to be adapted to OpenLiteSpeed and reinserted.
The current version of ISPmanager does not support PageSpeed and Node.js with the OpenLiteSpeed web server.
The installation may take a few minutes, depending on the performance of the server and the number of websites. Websites will be unavailable during web server installation.
When installing OpenLiteSpeed:
- the http://rpms.litespeedtech.com/ repository will be connected;
- configuration files will be prepared. For each IP address on the server, listeners will be created in the directory /usr/local/lsws/conf/listeners on TCP ports 80 and 443;
- for all installed alternate versions of PHP:
- an alternate version of PHP corresponding to the native version on this version of the operating system will be installed. For example, PHP 5.4 for CentOS 7 and PHP 7.3 for Debian 10;
- the created websites will be converted to work with OpenLiteSpeed;
- all previously created users will be allowed to use PHP in LSAPI mode if they were previously allowed to use PHP in at least one mode.
Perform the following steps to set up a web-server:
- Go to Settings → Software configuration → select a Web-server (WWW) → Edit.
- Select Apache:
- do not install;
- Apache MPM-Prefork — this method implements a non-threaded web-server. That means that each Apache child process contains a single thread and handles one request at a time. As long as the number of requests is fewer than the number of processes, Apache Prefork is very fast. The processes run with the permissions of the user that runs Apache. Therefore, it is less secure than Apache MPM-ITK and requires more permissions on website files;
- Apache MPM-ITK — it allows you to run each of your vhost under a separate uid and gid, so it is more isolated. Apache ITK helps avoid issues with accessing files of the user website.
- Select modules for Apache:
- Enable the Nginx option to install Nginx web-server.
- Enable the OpenLiteSpeed option to install OpenLiteSpeed web-server.
- Select PHP-FPM FastCGI for Nginx to support PHP "FastCGI (Nginx + PHP-FPM)". Learn more under PHP modes.
- Enable the Log rotation option to archive and delete old logs of web-servers. Learn more under Website statistics.
- Enable the PageSpeed Module option to install the PageSpeed module. The module automatically optimizes site pages and speeds up their loading. A different version of the module will be installed for each web server. For the web server to use the module for site pages, enable the PageSpeed Module option in the site settings. Read more in Add a website.
- Click Apply changes.