Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-04-27, 19:31:37

Author Topic: Enable SUPH return ERROR 500  (Read 9121 times)

0 Members and 1 Guest are viewing this topic.

Offline prgs1971

  • Valuable Member
  • *
  • Posts: 81
  • Karma: +0/-0
    • View Profile
    • http://premium-prestashop-hosting.com
Enable SUPH return ERROR 500
« on: 2013-08-18, 21:40:15 »
In Webserver Config i have done:

PHP Branch:
-selected php54_(as_5.4.17)
- hit update

Php Type
- selected suphp
- hit update

Fix 'ownership' And 'permissions'
- selected fix-All

After all this i have rebooted the server.

Now i am able to reach exanple.com, but get error 500 when try to reach cp.example.com

My suphp log show:
Code: [Select]
[Sun Aug 18 16:33:23 2013] [warn] UID of script "/home/kloxo/httpd/cp/index.php" is smaller than min_uid
Did i miss anything?

How to fix this?
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Enable SUPH return ERROR 500
« Reply #1 on: 2013-08-18, 21:49:59 »
Better not using suphp for primary php (because suphp used by secondary php).
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Enable SUPH return ERROR 500
« Reply #2 on: 2013-08-18, 22:01:08 »
Or you can modified /etc/suphp.conf where change 'min_uid=500' to 'min_uid=48'
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline prgs1971

  • Valuable Member
  • *
  • Posts: 81
  • Karma: +0/-0
    • View Profile
    • http://premium-prestashop-hosting.com
Re: Enable SUPH return ERROR 500
« Reply #3 on: 2013-08-18, 22:01:49 »
I don't use secondary PHP.

What will the best to use, regarding security in first place and performance/stability in second place?
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Enable SUPH return ERROR 500
« Reply #4 on: 2013-08-18, 22:04:10 »
All php-type already secure because unsecure php-type (mod_php) already remove from panel!.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline prgs1971

  • Valuable Member
  • *
  • Posts: 81
  • Karma: +0/-0
    • View Profile
    • http://premium-prestashop-hosting.com
Re: Enable SUPH return ERROR 500
« Reply #5 on: 2013-08-18, 22:08:13 »
Quote from: "MRatWork"
Or you can modified /etc/suphp.conf where change 'min_uid=500' to 'min_uid=48'

In Official kloxo that i use in my production server is not  necessary to change the above  suggestion.

/etc/suphp.conf file in production server
Code: [Select]
[global]
logfile=/var/log/httpd/suphp_log
loglevel=info
webserver_user=apache
docroot=/
env_path=/bin:/usr/bin
umask=0022
min_uid=500
min_gid=48

; Security options
allow_file_group_writeable=true
allow_file_others_writeable=false
allow_directory_group_writeable=true
allow_directory_others_writeable=false

;Check wheter script is within DOCUMENT_ROOT
check_vhost_docroot=false

;Send minor error messages to browser
errors_to_browser=false

[handlers]
;Handler for php-scripts
x-httpd-php="php:/usr/bin/php-cgi"

;Handler for CGI-scripts
x-suphp-cgi="execute:!self"

/etc/suphp.conf file in test server
Code: [Select]
[global]
logfile=/var/log/httpd/suphp_log
loglevel=info
webserver_user=apache
docroot=/
env_path=/bin:/usr/bin
umask=0022
min_uid=500
min_gid=48

; Security options
allow_file_group_writeable=true
allow_file_others_writeable=false
allow_directory_group_writeable=true
allow_directory_others_writeable=false

;Check wheter script is within DOCUMENT_ROOT
check_vhost_docroot=false

;Send minor error messages to browser
errors_to_browser=false

[handlers]
;Handler for php-scripts
x-httpd-php="php:/usr/bin/php-cgi"
x-httpd-php52="/opt/php52s/etc/php52s-cgi.sh"

;Handler for CGI-scripts
x-suphp-cgi="execute:!self"

;;; MR -- for using php52 just enough add 'AddHandler x-httpd-php52 .php' on .htaccess.
;;; it's make possible running 'dual php' on server!

Can the problem be related with the other differences between the 2 files?
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Enable SUPH return ERROR 500
« Reply #6 on: 2013-08-18, 22:12:14 »
It's because I am forgot when change ownership for /home/kloxo/httpd from lxlabs to apache.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline prgs1971

  • Valuable Member
  • *
  • Posts: 81
  • Karma: +0/-0
    • View Profile
    • http://premium-prestashop-hosting.com
Re: Enable SUPH return ERROR 500
« Reply #7 on: 2013-08-18, 22:12:52 »
Quote from: "MRatWork"
All php-type already secure because unsecure php-type (mod_php) already remove from panel!.

According what is stated in the second page of this pdf http://www.worldhostingdays.com/downloa ... tag2c1.pdf, you have to concern about the security of some of the options available in Kloxo-MR.
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline prgs1971

  • Valuable Member
  • *
  • Posts: 81
  • Karma: +0/-0
    • View Profile
    • http://premium-prestashop-hosting.com
Re: Enable SUPH return ERROR 500
« Reply #8 on: 2013-08-18, 22:21:37 »
Quote from: "MRatWork"
It's because I am forgot when change ownership for /home/kloxo/httpd from lxlabs to apache.

Sorry i don't understand well what you are trying to say.

Maybe you are trying to say that the ownership of /home/kloxo/httpd should be lxlabs ?

Recursevely ?
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Enable SUPH return ERROR 500
« Reply #9 on: 2013-08-18, 22:23:24 »
Old Kloxo (Kloxo official) set lxlabs as ownership for /home/kloxo/httpd and then I was change to apache (for certain reason) but forgot to adjustment suphp.conf.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline prgs1971

  • Valuable Member
  • *
  • Posts: 81
  • Karma: +0/-0
    • View Profile
    • http://premium-prestashop-hosting.com
Re: Enable SUPH return ERROR 500
« Reply #10 on: 2013-08-18, 22:34:46 »
So what you are saying is that you forgot to change the min_uid=500 to min_uid=48 in the /etc/suphp.conf file, when we select to use suphp in the Kloxo-MR Webserver Config.

Therefore the file /etc/suphp.conf should look like this:
Code: [Select]
[global]
logfile=/var/log/httpd/suphp_log
loglevel=info
webserver_user=apache
docroot=/
env_path=/bin:/usr/bin
umask=0022
; by prgs1971
; fix bug http://forum.mratwork.com/posting.php?mode=reply&f=5&t=19267
;min_uid=500
min_uid=48
min_gid=48

; Security options
allow_file_group_writeable=true
allow_file_others_writeable=false
allow_directory_group_writeable=true
allow_directory_others_writeable=false

;Check wheter script is within DOCUMENT_ROOT
check_vhost_docroot=false

;Send minor error messages to browser
errors_to_browser=false

[handlers]
;Handler for php-scripts
x-httpd-php="php:/usr/bin/php-cgi"
x-httpd-php52="/opt/php52s/etc/php52s-cgi.sh"

;Handler for CGI-scripts
x-suphp-cgi="execute:!self"

;;; MR -- for using php52 just enough add 'AddHandler x-httpd-php52 .php' on .htaccess.
;;; it's make possible running 'dual php' on server!
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Enable SUPH return ERROR 500
« Reply #11 on: 2013-08-18, 22:35:35 »
Yes and then try it.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline prgs1971

  • Valuable Member
  • *
  • Posts: 81
  • Karma: +0/-0
    • View Profile
    • http://premium-prestashop-hosting.com
Re: Enable SUPH return ERROR 500
« Reply #12 on: 2013-08-18, 22:48:32 »
Now it works with that new configuration.

Can you explain me why you don't use lxlabs as the user for run kloxo and instead you prefer to use the generic one apache?
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Enable SUPH return ERROR 500
« Reply #13 on: 2013-08-18, 22:58:11 »
It's because something lxlabs as user will be remove and maybe change to mratwork or other user. So, apache only as transition user.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline prgs1971

  • Valuable Member
  • *
  • Posts: 81
  • Karma: +0/-0
    • View Profile
    • http://premium-prestashop-hosting.com
Re: Enable SUPH return ERROR 500
« Reply #14 on: 2013-08-19, 01:34:42 »
For security reasons is always good idea to not use apache to run the programs or i am wrong?
« Last Edit: 1970-01-01, 01:00:00 by Guest »

 


Top 10 Social Networking:    Facebook    Twitter    LinkedIn    Pinterest    Google Plus    Tumblr    Instagram    VK    Flickr    Vine
Click Here

Page created in 0.033 seconds with 18 queries.

web stats analysis