Install a web server
What the web server is for
The web server handles user requests to sites hosted on a server with ispmanager.
Choose a web server
Ispmanager supports the following web servers:
- Nginx — handles requests for static content;
- Apache — handles requests for static and dynamic content;
- OpenLiteSpeed — handles requests for static and dynamic content.
Nginx is better at handling high server loads than Apache, but doesn't serve dynamic content. We recommend using Nginx and Apache together, so that Nginx handles requests for static files, and Apache — for dynamic content. Static content are files that are returned to the user as they are stored on the server. Dynamic content is modified by scripts before it gets to the user.
Web servers can handle multiple sites running on the same IP-address. To do that, Apache and OpenLiteSpeed use virtual hosts (VirtualHost), and Nginx uses multiple server sections in the configuration file. Web server configuration files contain all the necessary website parameters, which are based on the information you provide when creating a site. To learn more, read the article Add a website.
Install a web server
To install a web server:
- Go to Settings → Software configuration → select Web-server (WWW) → Software settings.
- Select Apache:
- do not use;
- 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 for 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.
- Check Nginx to install the Nginx web-server.
- Check OpenLiteSpeed to install the OpenLiteSpeed web-server.
- Check Logs rotation to archive and delete old logs of web-servers. To learn more, read the article Website statistics.
- Check awstats web-statistics to collect web domains statistics. To learn more, read the article Website statistics.
- Check webalizer web-statistics to collect web domains statistics (available for Ubuntu 20). To learn more, read the article Website statistics.
- Check PHP module to support the Apache module and FastCGI (Apache) PHP modes (available for Apache and Apache+Nginx). To learn more, read the article PHP modes.
- Check PHP-FPM FastCGI to support the FastCGI (Nginx + PHP-FPM) PHP mode (available for Nginx and Apache+Nginx). To learn more, read the article PHP modes.
- Check PageSpeed Module to install PageSpeed (available for Apache and Nginx). To learn more, read the article PageSpeed Module.
- Check PHP Composer to install PHP Composer. To learn more, read the article Модуль PHP Composer.
- Click Save and wait for the server to install.
Update Nginx: important information
Starting with version 6.107, ispmanager comes with its own Nginx build based on the stable version of the web server. This will help to support PageSpeed, ModSecurity and other modules that are not included with the standard build. This will also allow using Nginx new features regardless of the operating system, such as HTTP/3.
You can also update Nginx in earlier ispmanager versions after the panel updates to 6.107. To do that, run the script: /usr/local/mgr5/sbin/upgrade_nginx.sh
.
Nginx will also update if you install the Pagespeed or WAF (ModSecurity) module in Software configuration. To learn more, read the article PageSpeed Module.
Supported repositories
- Update is supported for Nginx and its modules installed from operating system repositories.
- Update is also available for the version installed from the repository http://nginx.org/packages/, except the following modules:
- nginx-module-geoip;
- nginx-module-njs.
Recommendations for non-standard configurations
If you want to update a custom version of Nginx:
- Back up Nginx configuration files (stored in /etc/nginx).
- Remove Nginx manually.
- Install Nginx through Software configuration in ispmanager.
Install OpenLiteSpeed: important information
OpenLiteSpeed cannot be installed with other web servers.
The current version of ispmanager does not support using the PageSpeed module and Node.js with the OpenLiteSpeed web server.
Migration to CloudLinux is not available if OpenLiteSpeed is installed on a server running AlmaLinux 8.
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 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 alternative versions of PHP:The PHP-FPM and Apache modules will be uninstalled;LSAPI module will be installed;
- an alternative version of PHP corresponding to the native version of the current operating system will be installed. For example, PHP 8.2 for Debian 12;
- existing websites will be reconfigured to work with OpenLiteSpeed;
- all previously created users will be allowed to use PHP in the LSAPI mode if they were previously allowed to use PHP in at least one mode.