# What WWW servers does DirectAdmin support?

DirectAdmin has support for a variety of WWW servers. To check which one is in use, and possible options:

cd /usr/local/directadmin/custombuild/
./build opt_help | grep webserver
>webserver: apache, nginx, nginx_apache, litespeed, openlitespeed. Current value: openlitespeed. Default value: apache.
1
2
3

Where:

  • apache is the most popular. This is the Apache HTTP server from https://httpd.apache.org/open in new window
  • nginx is high performance open-source web server, great for static files but has limitations for .htaccess files, so it may require manual adjustments. https://www.nginx.com/open in new window
  • nginx_apache is a powerful reverse proxy where nginx serves static files, while dynamic files and .htaccess are processed by Apache. It's a good choice without needs to modify existing scripts or mod_rewrite rules. It mainly benefits slow connections.
  • litespeed is a commercial web server. It is a drop-in replacement for Apache from LiteSpeed Technologiesopen in new window. It provides faster response times and reduced server load average when compared with Apache.
  • openlitespeed is the open source edition of the LiteSpeed Web Server, and contains all essential features and benefits from it, with some limitationsopen in new window. It's not a drop-in replacement for Apache though, due to lack of full .htaccess support and different configuration syntax.

Every system may have specific needs, a comparison table:

Web ServerAdvantagesDisadvantagesSuitable for shared hosting?
Apacheindustry standard, highly customizablehigh memory usage and slow for static filesYES
Nginxgreat performance and response timeshas no support for .htaccess, needs manual configuration for URL rewritesNO
Nginx+Apachegreat performance and response times, full support for .htaccesshigh memory usageYES for servers with 8+ GB of RAM
OpenLiteSpeedgreat performance, HTTP/3 support, built-in page cachingminimal .htaccess supportYES
LiteSpeedgreat performance, HTTP/3 support, page caching available, suitable for high-traffic sites, stunning performancecommercialYES

OpenLiteSpeed might be a great option for WordPress-only hosting or other CMSs that have the LSCache caching plugin.

# How to switch between webservers?

cd /usr/local/directadmin/custombuild
./build update
./build set webserver apache
./build php1_mode fastcgi
./build php2_mode fastcgi
./build php3_mode fastcgi
./build php4_mode fastcgi
./build apache
./build php n
./build rewrite_confs
1
2
3
4
5
6
7
8
9
10

More about apache

cd /usr/local/directadmin/custombuild
./build set webserver nginx
./build set php1_mode php-fpm
./build update
./build nginx
./build php d
./build rewrite_confs
1
2
3
4
5
6
7

More about NGINX

cd /usr/local/directadmin/custombuild
./build update
./build update_da
./build set webserver nginx_apache
./build nginx_apache
./build rewrite_confs
1
2
3
4
5
6

More about NGINX+Apache

cd /usr/local/directadmin/custombuild
./build update
./build set webserver openlitespeed
./build set mod_ruid2 no
./build set php1_mode lsphp
./build openlitespeed
./build php n
./build rewrite_confs
1
2
3
4
5
6
7
8

More about OpenLiteSpeed

cd /usr/local/directadmin/custombuild
./build update
./build set webserver litespeed
./build set php1_mode lsphp
./build set php2_mode lsphp
./build set php3_mode lsphp
./build set php4_mode lsphp
./build litespeed
./build php n
1
2
3
4
5
6
7
8
9

More about LiteSpeed