Current time: 05-18-2024, 06:41 PM Hello There, Guest! (LoginRegister)


Post Reply 
Nginx + VHCS
Author Message
eugenesan Offline


Posts: 4
Joined: Apr 2007
Reputation: 0
Post: #9
RE: Nginx + VHCS
Hi,

It's very interesting!
I was going to perform something similar but never found time for that :-(.
Can you please share your work with us?

(12-05-2008 10:49 AM)nlublovary Wrote:  During more than a year nginx was performing well as a proxy behind Apache and ISPCP on top. But with the growing amount of domains on our server, heave memory consumption and daily server crash became a serious a problem. Apache was leaking memory and I had to get rid of it. We started to use nginx as a complete Apache replacement and we didn't regret this decision. But what about ISPCP?

So I started to modify the ispcp templates. I thought this would be a huge task but no, not at all, if you setup nginx cleverly, that's the key. I finished migrating the iscp apache templates to nginx and it seems to work fine. I didn't touch any of the ispcp engines or php files.

PHP has to work in fcgi. I preferred to use phpfpm but a custom wrapper will do the job aswell. Because of phpfpm most of the changes had to be done in the fcgi templates. In fact, by default ISPCP is creating 1 wrapper for each domain with a custom php.ini. That's nice but for me it was way to complicated to manage a lot of domains. phpfpm keeps everything in 1 xml config file.

Perl and Ruby have to run in fcgi too, using a custom wrapper. This is done pretty quickly with nginx, also not many changes to be done to ispcp.

For Awstats there is nothing to be changed. I wrote 1 config file which will be included in every nginx vhost. No changes in ispcp. I could even manage to authenticate my Awstats users directly from MySQL ispcp.admin database.

As to the nginx config itself, I have nearly the same templates as the default apache templates. Of course the syntax is different but fairly the same. 00_master, 01_awstats, ispcp.conf and each vhost has it's own conf file included too. At the end, the nginx version of ispcp.conf looks more compact and lightweight compared to apache version of ispcp.conf.

I didn't care much about the location of the files, they are the same as Apache's. I compiled nginx to use Apache's log folder. This avoids me headache with logrotate, backups and awstats. nginx log is following the same layout as apache, traff, combined, access, error.

If there is interest for nginx+ispcp then I'm ready to write a how-to. Also, I would like to contribute my code to the project. After all, I would like to see the next version ISPCP working on Apache and/or Nginx, maybe with an option to chose server environment during ISPCP setup?
12-23-2008 04:49 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
Nginx + VHCS - solars - 02-05-2007, 08:15 PM
RE: Nginx + VHCS - ephigenie - 02-05-2007, 09:17 PM
RE: Nginx + VHCS - solars - 02-05-2007, 09:30 PM
RE: Nginx + VHCS - ephigenie - 02-05-2007, 10:41 PM
RE: Nginx + VHCS - solars - 02-05-2007, 10:54 PM
RE: Nginx + VHCS - nlublovary - 12-05-2008, 10:49 AM
RE: Nginx + VHCS - eugenesan - 12-23-2008 04:49 AM
RE: Nginx + VHCS - ephigenie - 12-07-2008, 03:41 AM
RE: Nginx + VHCS - TXC - 12-20-2008, 07:56 AM
RE: Nginx + VHCS - ceco91 - 01-11-2009, 07:48 PM
RE: Nginx + VHCS - eugenesan - 01-12-2009, 01:10 AM
RE: Nginx + VHCS - ceco91 - 01-12-2009, 04:24 AM
RE: Nginx + VHCS - ceco91 - 01-13-2009, 03:59 AM
RE: Nginx + VHCS - splitice - 07-09-2010, 06:56 PM
RE: Nginx + VHCS - xister - 07-09-2010, 07:14 PM
RE: Nginx + VHCS - splitice - 07-11-2010, 08:31 PM
RE: Nginx + VHCS - ephigenie - 07-11-2010, 09:40 PM
RE: Nginx + VHCS - Largo - 09-29-2010, 11:30 PM
RE: Nginx + VHCS - outbackdingo - 10-01-2010, 12:18 PM

Forum Jump:


User(s) browsing this thread: