nginx and apache

hebrew878

Verified User
Joined
Jul 3, 2011
Messages
61
Location
India
can i use nginx and apache together with DA?
for example
one site on nginx with php fpm
another site on apache with rewrite

Is that possible?
 
Hello,

Yes, with binding nginx to 11.22.33.44:80 and apache to 11.22.33.45:80 for example. But that might require serious customisation. But why do you need it?
 
because we have 1 dedicated server where DA installed and some sites are running on it.

we also have a busy site running on a 2GB RAM VPS where nginx-php fpm installed and it has no control panel only command line ssh access.

this site having heavy mysql read write now we are going to upgrade hardware for the dedicated server and thinking to move VPS site to the upgraded one.

i like to run this busy site with nginx-php fpm as like its running now on VPS without disturbing existing apache vhosts in DA.

Is that possible?
 
With CB 2.0 you can use NGINX+Apache where NGINX will be a front-end to apache. That's from a box. If you want your scheme then you probably need to customize NGINX templates for a certain virtual host to avoid apache.
 
You might also get away with running Nginx on it's own port (see zEitEr's first reply) and using an .htaccess rewrite, but then until/unless your users changed their bookmarks most of your visitors will end up on Apache for their first hit. I don't know if that's going to impact you greatly or not.

Jeff
 
thanks for the reply zEitEr and nobaloney.
i have 5 IPs on this server.i will not need any features from DA for this busy site except phpmyadmin,mysql,FTP access so i can setup nginx to listen on any unused IP:80
then for FTP access create a dummy account( for non exist domain) from DA and use its public_html document root as nginx vhost document root
Is that the best way to do this?
i just don't want to disturb DA and apache
 
Yes, I would do just the same: create an account through directadmin with a dummy domain, and point nginx vhost to that newly created account.
 
And since Apache by default binds to all IP#s on your server, if you're not using nginX as a proxy, then you'll likely need to set Apache custom configuration to not listen on that IP#.

Jeff
 
Back
Top