Apache to Nginx

BodisHS

Verified User
Joined
Jan 30, 2017
Messages
11
Hi There,

We currently have DirectAdmin running with around 10 customers.
I would like to use Nginx, instead of Apache.

My question is, if I enable/build Nginx will my current users also be set on Nginx? Or will i break their set-up

Kind regards,
Justin
 
It's indeed as simple as that, see it like changes from MS Office to Libre office. You don't migrate anything, you just start using a different program for the same.

But just to be sure, are you going to use reverse proxy or nginx only? Because if it's nginx only your customers probably need to change a few things themself. Mainly because nginx doesn't support .Htaccess files.
 
So i simply set nginx as webserver, and it will "migrate" the users from apache to nginx?


You need to

1. choose nginx as a web-server (nginx) or as a reverse-proxy in custombuild (nginx_apache)
2. install nginx
3. rewrite web-servers configs

This won't touch users' data, no .htaccess will ever be analysed and/or modified. If you choose nginx as a stand-alone server you will most likely break users sites as mod_rewrite rules will stop working. Thus if you want nginx you'd better start with nginx_apache option, where nginx will sit in front of apache and proxy requests to it, with this .htaccess will still read and mod_rewrite rules will be working.

With nginx_apache you might face issues in certain cases with DAV (options, put, etc), as it's disabled by default. Nginx configs will need to be customized.

With nginx_apache you might face issues with video and audio streaming if you use anything of this kind.
 
Hi There,

We currently have DirectAdmin running with around 10 customers.
I would like to use Nginx, instead of Apache.

My question is, if I enable/build Nginx will my current users also be set on Nginx? Or will i break their set-up

Kind regards,
Justin

If your Custombuild version is 2, the below commands will change your web server to Nginx and rewrite the config files:

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

Of course it's always recommended to have backups before making a drastic change to a server.
 
Back
Top