Portal Home > Knowledgebase > Articles Database > nginx as proxy?


nginx as proxy?




Posted by Hoodz, 07-18-2010, 01:58 PM
I have Apache running with PHP as FastCGI and i'm trying to improve performance... how hard is it to setup nginx as a proxy? and do i have nginx cache the pages as well? im also running cpanel with over 200 sites on it Last edited by Hoodz; 07-18-2010 at 02:02 PM.

Posted by minhmeo, 07-18-2010, 02:08 PM
Google first please

Posted by KMyers, 07-18-2010, 02:09 PM
Greetings,

Posted by fwaggle, 07-18-2010, 02:53 PM
There's a mod for Apache to fix that, but you'll have other issues with logging... namely that any static file served is only going to be logged by nginx. For one site in front of Apache that's already on a dedicated IP, it's easy. If you don't care about log integrity, just move Apache on that IP to another port, configure the host to answer in nginx, and set it to proxy_pass .php files to Apache's port. It took me about 10 minutes to proxy one website and I'd never used nginx before. Massaging the configs from cPanel so that all sites are reverse proxied is substantially more work. There's a complete article on this very forum about it, I suggest you search here to begin with.

Posted by RJohnson23, 07-19-2010, 12:43 AM
mod_rpaf will fix that.

Posted by viGeek, 07-19-2010, 03:48 PM
nginx works great as a proxy, you can enable proxy caching comparable to mod_proxy_balancer I believe. There are plenty of articles out there regarding this, it's very easy to setup assuming you have some basic linux knowledge.

Posted by quad3datwork, 07-19-2010, 03:52 PM
I noticed he stated he got 200+ sites on it. How would this proxy interact with virtulhost, cPanel, and such? I'm interested in this as well.

Posted by fwaggle, 07-19-2010, 10:43 PM
I think I've seen hacked-up scripts to add that functionality, but it's still just a hack. UNIXy might know more about it, his signature seems to imply so - but I'm not sure if that's how his setups operate or not. If you just want a drop-in replacement for Apache that'll go like the clappers, and you're not interested in tinkering with nginx or Apache, I'd probably just drop the coin on LiteSpeed and call it a day. Try search for nginx reverse proxy on these forums and see where that gets you.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Vortech Down (Views: 822)
DDoS question (Views: 744)
Non Virtual Server (Views: 830)
APF to block an IP (Views: 773)


Language:

LoadingRetrieving latest tweet...

Back to Top Copyright © 2018 DC International LLC. - All Rights Reserved.