ispCP - Board - Support
Nginx + VHCS - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Development Area (/forum-1.html)
+--- Forum: General discussion (/forum-11.html)
+--- Thread: Nginx + VHCS (/thread-142.html)

Pages: 1 2


Nginx + VHCS - solars - 02-05-2007 08:15 PM

First: Hi Smile and thank you guys for keeping this project up Smile I really appreciate that

I just wondered if anyone ever tried to use vhcs with Nginx?
I'm planning to use a setup like that and would appreciate any
suggestions, warnings, etc Smile

Thats it, thanks
Christoph


RE: Nginx + VHCS - ephigenie - 02-05-2007 09:17 PM

there're no plans to support nginx or lighttpd at the moment.
However it can be made by heavily modifying the templates and disabling some functions like htaccess protection and so on.


RE: Nginx + VHCS - solars - 02-05-2007 09:30 PM

yeah thats what I mean .. I don't think it would be so complicated, there was a similar thread on vhcs.net
http://vhcs.net/new/modules/newbb/viewtopic.php?topic_id=5411&forum=4&post_id=25793#forumpost25793

apart from this, rails with fcgi support would be really cool .. Smile


RE: Nginx + VHCS - ephigenie - 02-05-2007 10:41 PM

yeah but this is limited by mod_fastcgi / mod_fcgid afaik they cannot handle multiple that in parallel ?
(yeah i know lighty and nginx can )


RE: Nginx + VHCS - solars - 02-05-2007 10:54 PM

I never tried that with mod_fcgid...


RE: Nginx + VHCS - nlublovary - 12-05-2008 10:49 AM

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?


RE: Nginx + VHCS - ephigenie - 12-07-2008 03:41 AM

For sure there's interest for this kind of setup!

We'll be happy to see your HowTo Wink


RE: Nginx + VHCS - TXC - 12-20-2008 07:56 AM

nlublovary >> That whould be great. i have set nginx in front of apache, and have reduced the load on apache alot, now i'm looking on guides to replace apache permantly.

I would really appreciate your guide.


RE: Nginx + VHCS - eugenesan - 12-23-2008 04:49 AM

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?



RE: Nginx + VHCS - ceco91 - 01-11-2009 07:48 PM

I have started setting up the nginx but I cant make i work with php, using mod_fcgi I have read lots of HowTos but none of them help me. I came to the conclusion that I should compile php but now I cant do it so I search for other ways to set up nginx to work with php module.