Install/Switch Nginx without Apache

Amin

Verified User
Joined
Apr 21, 2013
Messages
9
hello there

i search a lot in the direct admin forum
i can't find any complete topic about installing nginx or lighttpd... every one say direct admin don't support nginx whereas a lot of users want to switch to nginx webserver (without proxy with apache)

why direct admin don't give a complete solution for this problem ???

if he does not like to add an option in panel for switching between nginx and apache , at least give a complete and supported way just for installing it to users !!!

it's bad idea ??? da don't like to Satisfy it users ?
http://forum.directadmin.com/showthread.php?t=22586&page=6 this topic is unfinished! and admin didn't answer any more

thanks if you read my post !
 
I'd love to see something like the cpanel cpXstack plugin that allows both to be run and you choose what server to use per site.
site 1 could be nginx while site 2 could be apache.
this worked very well for me.
 
And how is it possible to set one site to nginx and another site to apache if you've got only IP? I guess you need at least 2 IPs on account, don't you?
 
nope, I was not able to tell how they did it for sure but there had to be some hinky virtual hosts / proxy or something.
and it works well.
I ran 2 sites off nginx and 2 off apache on 1 ip on the cpanel server I am presently decommissioning.
 
Probably in case of Apache Nginx is reverse proxy for one site.

So they've got NGINX on 80 port, and user can decide whether to proxy requests to apache, or let NGINX to serve them by itself: both static and PHP. You mean this, don't you?
 
I suspected they were using nginx proxy to apache on the apache sites and to test it I stopped nginx.
apache sites still worked.
so I don't know. was only running a week or so before I built new server with DA so didn't get a lot of time to dig into it.
whatever they did, it worked well and also allowed sites to choose php versions, they could be on php-fpm (could choose 5.3 or 5.4) no matter what the apache/nginx choice OR not use php-fpm (my choice for apache sites) and use the default system php version.
 
I think this is pertinent line in the setup files
sed -i "s/80/9999/" /etc/chkserv.d/httpd
if [ -f /etc/csf/csf.conf ];then
echo '#cpXstack#' >> /etc/csf/csf.pignore
echo 'exe:/usr/sbin/nginx' >> /etc/csf/csf.pignore
echo 'pexe:/opt/pifpm/php-.*/sbin/php-fpm' >> /etc/csf/csf.pignore
echo '#cpXstack#' >> /etc/csf/csf.pignore
fi
so it looks as if everything on 80 goes to nginx php-fpm and then is passed off to apache
 
Last edited:
How to switch with simple language ?!!!

damn

why i can't post in this topic
it think the forum posting has damaged
 
How to switch with simple language ?!!!

i wrote a question about 10 line!! and when i post that in this topic this error shows to me :
Warning: Object of class vB_DataManager_Thread_FirstPost could not be converted to string in ..../global.php(29) : eval()'d code on line 132


i want to know how to switch and install nginx
this is my options.conf file :
Code:
php1_release=5.5
php2_release=no
php1_mode=php-fpm
php2_mode=no
htscanner=yes
php_ini=no
.....
#Apache settings
#Possible value: 2.4
apache_ver=2.4
mod_ruid2=no
secure_htaccess=no

i try ./build nignx
but it said :
You cannot install Nginx, because you do not have it set in options.conf file.

i don't see anything about nginx in this "options.conf" file!?
 
damnwhy i can't post in this topic
it think the forum posting has damaged
Four posts were deleted as duplicates. There's very limited support available for Beta software and requesting help over and over again in words either the same or simlar, won't get you any better help. If you need clarification on a reply please ask for a specific clarification of what you need to know.

Jeff
 
Switch it easier!

Four posts were deleted as duplicates. There's very limited support available for Beta software and requesting help over and over again in words either the same or simlar, won't get you any better help. If you need clarification on a reply please ask for a specific clarification of what you need to know.

Jeff

i just send one post ! i'm not crazy to send one post for 4 time!!!
i get error each time that i send my post!
it's better to check here vBulletin configs!
thanx

You need to change this value:

webserver=apache

to

webserver=nginx

If you dont have this value, add it.

Regards

hello , thanx.. i'm using nginx now as well .

but if anyone want to install nginx webserver after configure options.conf must use " ./build all d "

./build nginx don't do anything at all!
------------------------------------------------------------------------------------
it's very hard to change webserver each time!
if you see Kloxo Admin panel there is a button that you can choose your webserver
apache - nginx+apache proxy - nginx

if direct admin make a feature like this it will be very powerful!

and i have another question , can't we use nginx+fastcgi at all ?
 
Last edited:
Make sure you are using CustomBuild 2.0. webserver=nginx would do nothing if CustomBuild 1.1 or 1.2 is used.
 
Make sure you are using CustomBuild 2.0. webserver=nginx would do nothing if CustomBuild 1.1 or 1.2 is used.


switched back to apache for now, but i did noticed when i need to login admin area of the forums i see everything fine everything else is blank page

@smtalk you think you have an idea what that maybe ?

Corrected ...EDIT

changed php 5.5 to 5.3 fixed
 
Last edited:
Back
Top