Fastcgi and ISPC

Discussion in 'Installation/Configuration' started by tom, May 12, 2006.

  1. tom

    tom Member

    I'm would like to know if sombody has a server running together with the apache mod fastcgi.

    I'm interessed how to configure the it and what for difficulties I have to expect.
     
  2. falko

    falko Super Moderator ISPConfig Developer

  3. tom

    tom Member

  4. tom

    tom Member

    There are some problems to integrade it. That is to customize it. fastcgi works whith vhosts but ISPC creates all vhost new all the time.

    Where is the script generating the vhosts?
    Where is the script generating the the users and groups?

    Are there any instructions for all nessesary scripts available?
    Have you ideas to integrate fastcgi in ISPC?
     
    Last edited: May 14, 2006
  5. falko

    falko Super Moderator ISPConfig Developer

  6. tom

    tom Member

    I've found a more details description for fastcgi but I'm no sure how to integrate it. This howto I've found:
    http://archiv.debianhowto.de/de/apache2-phpfcgi-sarge/apache2-phpfcgi_vhost_config.html



    It is possible to set different setting for every vhost by using the option form for httpd.conf from ISCP?
    I mean the particular setting possibillity from fastcgi.

    IF I put that:
    Code:
    
          ScriptAlias /cgi-bin/ /var/www/php-fcgi-scripts/VHOST/
            <Directory "/var/www/php-fcgi-scripts/VHOST">
                    AllowOverride None
                    Options +ExecCGI -MultiViews -Indexes
                    Order allow,deny
                    Allow from all
            </Directory>
    in the option form field I get not supported


    Where is the script generating the vhosts?
    Where is the script generating the the users and groups?




    Are there any instructions for all nessesary scripts available?
     
    Last edited: May 14, 2006
  7. falko

    falko Super Moderator ISPConfig Developer

    Yes, by using the Apache Directives field.

    Then your apache is not configured properly.


    It's both in /root/ispconfig/scripts/lib/config.lib.php.




    No.
     
  8. tom

    tom Member

    That's a part of the general fastcgi.conf:
    I don't know what to do whith the PRIM_VHOST, USER_PRIM_VHOST , and GROUP_PRIM_VHOST

    Are this general or specific rights and paths? If that is the general fastcgi.conf that must be generel but what would be the general user and group or what means PRIM?
     
  9. samrolken

    samrolken New Member

    I also get the lines commented out and NOT SUPPORTED! put on the end. I followed that how-to to the letter, and everything else worked perfectly.
     
  10. falko

    falko Super Moderator ISPConfig Developer

    Make sure mod_fcgi is enabled in your Apache configuration.
     
  11. Ovidiu

    Ovidiu Active Member

    did I get this right?

    I can just take my perfect debian 3.1 installation, make the steps shown in this tutorial: http://www.howtoforge.com/ruby_on_rails_apache2_fastcgi_debian - I mean only make those steps that were not included in the original tutorial like install ruby, then go to the part where it says:
    and then I only have to do this:
    and do I still have to do this step:

    what about the last step:

    this seems dangerous to me, changing the owner of all data in any subdirectory on the server account from web1_XXX:web1 to www-data:web1

    has anyone successfully applied this like I suggested?
     
  12. Ovidiu

    Ovidiu Active Member

    ok, since I got no answer, I followed the turorial and noticed that almost all packages that were suggested to be manually compiled could also be installed with apt-get - what is to be prefered? I would prefer using apt-get because that way they would also be updated by a apt-get dist-upgrade

    stil I have some more questions:

    what and where exactly is the rails application directory ? is it this: /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/ ? there is no public folder only a html folder...

    will cp -R * /var/www/web1 overwrite anything if I try to enable fastcgi for an existing web2 accounbt on my server or can I only enable fast-cgi support to new accounts?

    can the part of modifying the .htaccess be somehow also be done by entering
    inside the apache directives field in the ispconfig panel for that site?

    is this
    not too much if trying to do these changes to an existing site?
     
    Last edited: Sep 26, 2006
  13. Ovidiu

    Ovidiu Active Member

    Following the tutorial I only have fastcgi no mod_fcgi is this right?
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    fastcgi and mod_fcgi are nearly the same. If I remember correctly, the development on fastcgi has stopped and the project has been reactivated by other developers under the name mod_fcgi. But the config options of both modules differ a bit.
     
  15. Ovidiu

    Ovidiu Active Member

    I got a step further:

    I had to use this:
    instead of this:

    at least I got a step further, still working on the whole setup...

    then I had to do a :

    the I renamed /var/www/rails/test/public to /var/www/rails/test/web and then moved /var/www/rails/test/web /var/www/web1/web

    and then chown all files that I moved to the user/owner of that particular web1_postmaster:web1 (it did not work setting the suer to www-data as described in the howto as I use suexec (I only guess that is the reason)

    now I can access the basic index.html generated by rails test but I guess to get it to run I will have to copy /var/www/rails/test into /var/www/web1 - can anyone confirm the logic I am trying to see here?
     
    Last edited: Sep 26, 2006
  16. Ovidiu

    Ovidiu Active Member

    ok, finally got ir up and running, still having problems getting it to run because I use the debian chroot tutorial, so for installing a first test site I had to remove a user from the chroot environment....

    I have /usr/bin/ruby1.8 and /usr/bin/gem in the chroot, still it complains about rubygems,.... I'll be back with more info later
     
  17. Simon

    Simon New Member

    fastcgi development stopped several years ago and anyway fastcgi has a bad history with Apache 2. In our experience it should really be regarded as suitable for Apache < 1.3 only.

    When we needed to configure a Fast CGI module for Ruby on Rails, we successfully used mod_fcgid - a binary compatible alternative. See: http://fastcgi.coremail.cn/index.htm. We struggled with he latest release, 1.10, but the previous release, 1.09, works very well indeed and seems completely stable. We successfuly host several production Rails sites now using ISPC, FC4, Apache2 and mod_fcgid.

    Hope this helps.
     
  18. Ovidiu

    Ovidiu Active Member

    I am a little confused, I followed the tutorial, especially this page: http://www.howtoforge.com/ruby_on_rails_apache2_fastcgi_debian_p4

    there it says:
    I did that, am I using the right version/mod/whatever ?
     
  19. Ovidiu

    Ovidiu Active Member

    ok the first client got his site up and running with ruby on rails. http://www.hai-hui.eu/ if you want to have a look.

    besides that I found an interesting article about tuning apache2 and ruby on rails: http://scottstuff.net/blog/articles/2005/07/20/apache-tuning-for-rails-and-fastcgi I already implemented this and it works fine.

    now I was thinking about this: /etc/apache2/mods-enabled/fastcgi.conf

    what about the suexec directive? does it make sense? does it work?
    and btw. can someone give me some hints how to make it work with a chrooted user according to the howto for debian? I alreaday included these apps but still no luck:
    here is another tutorial that gave me some hints - when I was looking for solutions: http://wiki.rubyonrails.com/rails/pages/Rails+on+CentOS+4.3+with+Apache+and+FastCGI+Simply

    how to get ruby on rails running in a jail?

    ruby and rails and gem are already in the jail...
     
    Last edited: Oct 2, 2006
  20. Ovidiu

    Ovidiu Active Member

    ok, I have a vhost for which I start 2 statical processes, but today I found 3 processes running:

    could anyone explain why I have 2 processes started by apache like I wanted and a third one just like that? how can I find out where that one comes from?
    how about getting fcgi processes to run as suexec group/user so the client can kill his own fcgi processes?
     
    Last edited: Oct 14, 2006

Share This Page