Current time: 12-23-2024, 05:55 PM Hello There, Guest! (LoginRegister)


Post Reply 
Nginx + VHCS
Author Message
solars Offline
Newbie
*

Posts: 5
Joined: Feb 2007
Reputation: 0
Post: #1
Nginx + VHCS
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
02-05-2007 08:15 PM
Find all posts by this user Quote this message in a reply
ephigenie Offline
Project Leader
*******
Administrators

Posts: 1,578
Joined: Oct 2006
Reputation: 15
Post: #2
RE: Nginx + VHCS
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.
02-05-2007 09:17 PM
Visit this user's website Find all posts by this user Quote this message in a reply
solars Offline
Newbie
*

Posts: 5
Joined: Feb 2007
Reputation: 0
Post: #3
RE: Nginx + VHCS
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/viewto...mpost25793

apart from this, rails with fcgi support would be really cool .. Smile
02-05-2007 09:30 PM
Find all posts by this user Quote this message in a reply
ephigenie Offline
Project Leader
*******
Administrators

Posts: 1,578
Joined: Oct 2006
Reputation: 15
Post: #4
RE: Nginx + VHCS
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 )
02-05-2007 10:41 PM
Visit this user's website Find all posts by this user Quote this message in a reply
solars Offline
Newbie
*

Posts: 5
Joined: Feb 2007
Reputation: 0
Post: #5
RE: Nginx + VHCS
I never tried that with mod_fcgid...
02-05-2007 10:54 PM
Find all posts by this user Quote this message in a reply
nlublovary Offline


Posts: 1
Joined: Dec 2008
Reputation: 0
Post: #6
RE: Nginx + VHCS
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-05-2008 10:49 AM
Find all posts by this user Quote this message in a reply
ephigenie Offline
Project Leader
*******
Administrators

Posts: 1,578
Joined: Oct 2006
Reputation: 15
Post: #7
RE: Nginx + VHCS
For sure there's interest for this kind of setup!

We'll be happy to see your HowTo Wink
12-07-2008 03:41 AM
Visit this user's website Find all posts by this user Quote this message in a reply
TXC Offline
Junior Member
*

Posts: 43
Joined: Jun 2008
Reputation: 1
Post: #8
RE: Nginx + VHCS
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.
12-20-2008 07:56 AM
Find all posts by this user Quote this message in a reply
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
ceco91 Offline
Moderator
*****
Moderators

Posts: 95
Joined: Jan 2009
Reputation: 0
Post: #10
RE: Nginx + VHCS
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.
01-11-2009 07:48 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 3 Guest(s)