Results 1 to 9 of 9

Thread: Having trouble with apache and suphp

  1. #1
    Join Date
    Feb 2018
    Posts
    5

    Having trouble with apache and suphp

    Hello every body!
    I have nginx_apache web server (last version) on my Direct Admin server with CentOS.
    I have installed two php:
    First: 7.2 with suphp
    Second: 5.6 with fastcgi

    today I wanted to open a page on my server that I faced with 502 Bad Gateway error and checked the nginx error log and it was empty! so I went to open apache's error log and found this log:


    [Sun Feb 11 19:14:01.346482 2018] [mpm_event:notice] [pid 24154:tid 140188786718656] AH00491: caught SIGTERM, shutting down

    then I informed with DA message system that "apache is currently down". So I tried to restart/start it but this action failed because of this error:

    Starting httpd: AH00526: Syntax error on line 49 of /usr/local/directadmin/data/users/admin/httpd.conf:
    Invalid command 'suPHP_Engine', perhaps misspelled or defined by a module not included in the server configuration

    Anybody could help me?
    Thanks

  2. #2
    Join Date
    Apr 2009
    Posts
    2,105
    I don't think SuPHP is stable when running mpm event. If you want to run SuPHP, you should run mpm prefork. However if you do not modify the httpd config files manually, DirectAdmin should take care of this for you. My guess is you need to run:

    Code:
    ./build update
    ./build rewrite_confs

  3. #3
    Join Date
    Apr 2009
    Posts
    2,105
    Edit: By the way, SuPHP is outdated and not developed for many years, you should not use it. Instead PHP-FPM is a good option.

  4. #4
    Join Date
    Aug 2015
    Posts
    293
    ditto is right, but when you use Apache and Nginx as reverse proxy it is required to run both in PHP-FPM.

    Code:
    cd /usr/local/directadmin/custombuild
    
    ./build set php1_mode php-fpm
    ./build set php2_mode php-fpm
    ./build set php1_release 7.2
    ./build set php2_release 5.6
    then at the end

    Code:
    ./build php n
    ./build rewrite_confs
    Kind regards, Fred

    Alentejo Webdesign
    Webdesign with Passion is what we do
    Web development, Hosting, Speed Optimizing & More......

  5. #5
    Join Date
    Feb 2018
    Posts
    5
    Quote Originally Posted by ditto View Post
    Edit: By the way, SuPHP is outdated and not developed for many years, you should not use it. Instead PHP-FPM is a good option.
    So, wich handler you suggest me?
    I need a fast and secure handler. Is fastcgi better than php-fpm? because php-fpm only supports nginx (as I know)

  6. #6
    Join Date
    Feb 2018
    Posts
    5
    Quote Originally Posted by Awd View Post
    ditto is right, but when you use Apache and Nginx as reverse proxy it is required to run both in PHP-FPM.
    excuse me, Are you sure that php-fpm supports both of nginx and apache together?

  7. #7
    Join Date
    Apr 2009
    Posts
    2,105
    Quote Originally Posted by NeTGuarD View Post
    So, wich handler you suggest me?
    I need a fast and secure handler. Is fastcgi better than php-fpm? because php-fpm only supports nginx (as I know)
    In my opinion PHP-FPM is better and more modern than all the other options. PHP-FPM supports Apache also.

  8. #8
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    12,039
    PHP-FPM does not care of Apache, NGINX, etc. But both Apache and NGINX can connect to PHP-FPM when it's needed for processing PHP scripts. It is Apache and NGINX which supports PHP-FPM.

    Quote Originally Posted by NeTGuarD View Post
    excuse me, Are you sure that php-fpm supports both of nginx and apache together?

  9. #9
    Join Date
    Feb 2018
    Posts
    5
    Thank you guys for helping

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •