1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

how to enable and run nginx with php-fpm instead of fastcgi

Discussion in 'Plesk 11.x for Linux' started by Luo SijiaL, Nov 6, 2012.

  1. Luo SijiaL

    Luo SijiaL New Pleskian

    11
     
    Joined:
    Jul 28, 2012
    Messages:
    22
    Likes Received:
    0
    i have install nginx via plesk,

    it seems a standard installation with fastcgi to interact with php.

    however, i want to use nginx with php-fpm which is supported in php5.

    the config file is quite decentralized and i donot have so much idea.

    i really need some help!

    thx in advance.
     
  2. LaszloD

    LaszloD Guest

    0
     
    Have you tried by going in Plesk -> Subscriptions -> Select domain -> Websites and Domains -> click on "Show Advanced Operations" -> Website Scripting and Security ?
     
  3. Luo SijiaL

    Luo SijiaL New Pleskian

    11
     
    Joined:
    Jul 28, 2012
    Messages:
    22
    Likes Received:
    0
    thx for response, i will check that now,
     
  4. Luo SijiaL

    Luo SijiaL New Pleskian

    11
     
    Joined:
    Jul 28, 2012
    Messages:
    22
    Likes Received:
    0
    i am on that page now, what should i do?
     
  5. LaszloD

    LaszloD Guest

    0
     
  6. Luo SijiaL

    Luo SijiaL New Pleskian

    11
     
    Joined:
    Jul 28, 2012
    Messages:
    22
    Likes Received:
    0
    yes, i see three options but there is no php-fpm mode,
    i only see apache module/fastcgi/cgi-application,

    i think i also install nginx as reverse proxy via plesk, are they different?
     
  7. LaszloD

    LaszloD Guest

    0
     
    Yes....if you use nginx as proxy, the server is apache. If you use nginx, nginx is the server.
    First you need to know what are you running, apache or nginx, then install the php-fpm. Here you have a tutorial: http://www.howtoforge.com/using-php5-fpm-with-apache2-on-centos-6.2-p2

    Read carefully.

    Then, you should override Plesk fcgid handler in vhosts template file:

    /usr/local/psa/admin/conf/templates/default/domain/domainVirtualHost.php
    /usr/local/psa/admin/conf/templates/default/service/php_over_fastcgi.php

    HOWEVER, it is not recommended to modify these files directly, since your changes will be lost after Plesk upgrade.
    INSTEAD, you should put your customizations into
    /usr/local/psa/admin/conf/templates/custom/

    More info here: http://download1.parallels.com/Ples...figuration-guide/index.htm?fileName=64628.htm
     
  8. Luo SijiaL

    Luo SijiaL New Pleskian

    11
     
    Joined:
    Jul 28, 2012
    Messages:
    22
    Likes Received:
    0
    really thx for the kind help!

    i will check the tutorials carefully and give the feedback that how do those work on plesk environment :)
     
  9. Luo SijiaL

    Luo SijiaL New Pleskian

    11
     
    Joined:
    Jul 28, 2012
    Messages:
    22
    Likes Received:
    0
    and first i have a simple question,

    if people, like us, use nginx as proxy, does it mean the main framework is still LAMP, and most configuration should still be handled by apache config files including switch fastcgi to php-fpm ?

    and does plesk currently ONLY offer the installation of nginx as a reverse proxy?
     
  10. LaszloD

    LaszloD Guest

    0
     


    Yup...still LAMP :) Nginx is acting as proxy, but accelerating and caching the static content of your website.
    As I know, parallels/plesk supports nginx only as reverse-proxy. Parallels/plesk is good for Windows, but for Linux not. Also, the support here is pretty horrible. CPanel is a better alternative if you want nginx. I would go for it but it's not me the one paying the hosting :)

    However, using nginx as proxy is pretty enough and more stable, as apache is supporting htaccess and more features nginx don't. Apache + Nginx + APC should be enough. However, there are issues with APC and nobody helps me here -_-
     
  11. Luo SijiaL

    Luo SijiaL New Pleskian

    11
     
    Joined:
    Jul 28, 2012
    Messages:
    22
    Likes Received:
    0
    em.. so does that mean we also need to configure apache for enabling php-fpm?
    in nginx installed by plesk, previously, i dont test out the fastcgi-cache-purge. now based on current understanding you teach me:), this role of the fastcgi-cache module in nginx as standalone is similar to the role of nginx as reverse proxy, is that right?

    it's also a pity for me, currently i am using the host service in mt(mediatemple) with a kind of VPS, it provide CentOS and OpenVZ virtualization, but only support plesk. :) fortunately user can have root access, - -but as i said, i previously didnot realize that nginx as proxy installed via plesk is different with a "whole" nginx server. maybe some time later i can develop more understanding with nginx so i can manually install and configure it by myself.

    are you running a VPS on linux? and what is the problem you are suffering, i heard that APC is a quite good component to optimize the website. do you have tried to post a request to you host provider? maybe i can also post your problem to my vendor's customer support center, if you need. they guys will generally say something like "unfornately XXX is out of the scope of support provided by XXX, but as a courtesy i will XXXXXXX...." (haha i have listened it for nearly one year @.@) but will also analyse the problem more or less and may give some useful infomration, solution or advise possibly

    em.. be patient, i believe you will find a way :)
     
    Last edited: Nov 6, 2012
  12. LaszloD

    LaszloD Guest

    0
     
    Yup...something like that. You can add what you want to the nginx server, the only thing is that the server is apache, but the clients will see it as nginx.

    And yes, the company I work have a VPS, an unmanaged one so no support from hosting company. I always used webmin and never had problems, but with all this paid (and expensive) panels always are problems.. My problem is that APC is restarting each 15 seconds, it's working but restarting and all this because in the damn plesk I have set fastcgi but I'm getting fcgid instead (plesk bug !!!) and fcgi is not compatible with apc...
    3 days and no answer yet
     
  13. Luo SijiaL

    Luo SijiaL New Pleskian

    11
     
    Joined:
    Jul 28, 2012
    Messages:
    22
    Likes Received:
    0
    Oh, poor plesk, sometimes it appears to make things easy and safe but may not so configurable for advanced management.

    Is it possible to install those things manuelly on your management account?

    Do you mean plesk donot perform well on configure those things?

    And just the previous question i still have some confusion. Should we add php-fpm on nginx proxy or apache exactly?
     
  14. LaszloD

    LaszloD Guest

    0
     
    The main issues are that you don't know where to modify that because there is no documentation around. Plesk is only for people without experience, but when you need changes, you don't want to mess with it. My company websites have hundreds and thousands of hits daily and I can't test the config and mess with the server now, so I need the right solution fast and the support here is useless.
     
Loading...