PDA

View Full Version : Nginx on DirectAdmin



eknip
12-15-2010, 01:34 PM
Hi all,

I'm looking into the possibilities of installing Nginx on my DirectAdmin box. So far I found several howto guides, but they are all pretty different (obviously because there changed a lot since the guides were written). I know there are nginx plugins (like danginx), but I'd prefer to not use a plugin.

Is there anyone here who installed nginx and have got best practices, tips or any suggestions?

Here are the guides that I found:

February 2010
http://directadm.in/nginx

August 2008
http://www.directadmin.com/forum/showthread.php?t=27344&highlight=ngnix

June 2007
http://www.directadmin.com/forum/showthread.php?t=20133

zEitEr
12-16-2010, 12:20 AM
There's no difference how do you install Nginx. It depends on you and your needs for specified modules or settings. Nginx can be installed from Epel Repo (on CentOS/RedHat), but that rpm doesn't include some modules, needed by us. That's why we install Nginx from sources, it's not a big deal. If you use FreeBSD, nginx is already ported, and you can pre-configure it's installation.

Different approaches are used in integrating Nginx with Directadmin. The simplest way is to make Apache to listen all request on port 8080 (for example), and Nginx to listen on *:80. Configure Nginx to proxy all requests to Apache - and that's it. After that you can lower some Apache's limits.

If you need different setting for virtual hosts in Nginx, or if you want to make Nginx to give all static files without proxing such request to Apache, you won't do that without Directadmin's post/pre scripts. And that defines the reasons of existing a number of different plugins and ways of integration.

We use Nginx on all our server. And for now we're testing some new features.

rjd22
12-17-2010, 04:59 AM
I installed nginx by this guide http://directadm.in/nginx

It's still up to date so you can use that one :)

AsadMoeen
12-17-2010, 10:19 PM
I installed nginx by this guide http://directadm.in/nginx

It's still up to date so you can use that one :)


I tried this one. It basically explains what to do after the Nginx is installed using the scripts but basically we need to install it from a source 1st. That's where it actually fails.

zEitEr
12-17-2010, 11:37 PM
They can install Nginx from whatever they like. That does not really matter.
Nginx is available in Debian with apt-get/aptitude commands.

eknip
12-18-2010, 02:34 PM
I tried this one. It basically explains what to do after the Nginx is installed using the scripts but basically we need to install it from a source 1st. That's where it actually fails.


I installed nginx with this guide http://articles.slicehost.com/2008/12/17/centos-installing-nginx-via-yum

The only problem so far is that it's using different paths for files and that I can't find the file task.nginx anywhere (see http://directadm.in/nginx%3Asubdomain_destroy_post.sh)

AndyII
11-22-2011, 05:47 PM
@ zEitEr

so your very happy with ngnix I would assume...
I am seriously considering this on a box with DA and centOS, or Scientific Linux
I hear people say that it is better than Apache and more efficient.
I was here looking for the gods of linux here to answer some questions and perhaps a gentle guide
maybe some do's and dont's , thing to expect or change, pros and cons
so chatting with someone who uses this would be better and more realistic

zEitEr
11-22-2011, 10:15 PM
Feel free to contact me by PM or using form on my site (see my signature) if you need my private help. Or simple post your questions in the thread.

Tootle
02-23-2012, 08:04 AM
Lately I've decided -at first occasion- to install nginx as reverse proxy on my OpenVZ VPS - there's quite plenty of how-to's, more or less complete and of course there's danginx plugin .. and I found this

http://code.google.com/p/nginx-directadmin/ (http://code.google.com/p/nginx-directadmin/)

never saw this mentioned anywhere, looks like in-fact it is quite the same actions from how-to's, do you think - it will be safe to try it?

zEitEr
02-23-2012, 09:35 AM
Seems to be a good work, but I did not test it. I only did a quick scan of the shell script http://www.directadmin.cc/nginxda/latest and did not look at nginx configs and templates either. Also I did not check a nginx plugin from idclayer which comes with the installation of nginx.