Enable Nginx on DirectAdmin?

Mujkanovic

Well-known member
Collaborate
Registered
Joined
Apr 24, 2016
Messages
424
Points
18
How can I enable Nginx on DirectAdmin? is it better than Apache on Directadmin? I am using apache web server but I heard that Nginx is better and faster for my websites. Which do I need to note when using Nginx on DirectAdmin? any advice?
 

AlbaHost

Well-known member
Moderator
Hosting Provider
Joined
Jan 18, 2017
Messages
790
Points
43
How can I enable Nginx on DirectAdmin? is it better than Apache on Directadmin? I am using apache web server but I heard that Nginx is better and faster for my websites. Which do I need to note when using Nginx on DirectAdmin? any advice?
If you need .htaccess for your websites, then manual configuration it is required. Otherwise nginx as a reverse proxy and apache works perfectly fine.
 

Napster.

New member
Registered
Joined
Sep 14, 2021
Messages
10
Points
1
Step 1: Updating CustomBuild
Please confirm you are using CustomBuild 2.0. If you're not sure about this, please follow our guide on how to upgrade CustomBuild and/or check its current version.

Step 2: Modifying CustomBuild
Before we can recompile our DirectAdmin installation for it to work with Nginx and Apache, navigate to the CustomBuild directory:

cd /usr/local/directadmin/custombuild

Open the configuration file:

vi options.conf


Step 3: Modifying the PHP versions
DirectAdmin supports using multiple PHP versions alongside each other.

Currently, using an Nginx and Apache reverse proxy with DirectAdmin requires php-fpm to be used. If this is currently not the case, alter php1_mode and php2_mode in the CustomBuild options.conf file to the value php_fpm.

Step 4: Installing Nginx
After saving this file, install Nginx:

cd /usr/local/directadmin/custombuild
./build set webserver nginx_apache

This will not remove Apache.

Step 5: Deploying the reverse proxy
After compiling and building the web server, we will need CustomBuild to rewrite all configurations on the server:

./build update
./build nginx_apache
./build rewrite_confs

Nginx will now be installed. Depending on the size of your server, this will take about 30 minutes. Please be patient and don't interrupt the installation or it will most likely fail and break the server.

Thats it.
 
Latest Threads
Recommended Threads
Replies
30
Views
14,528
Replies
16
Views
8,201
Replies
0
Views
1,693
Replies
7
Views
5,561
Replies
0
Views
1,305

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top