{"id":370,"date":"2011-01-28T11:07:53","date_gmt":"2011-01-28T10:07:53","guid":{"rendered":"http:\/\/kb.toderu.ro\/?p=370"},"modified":"2011-01-28T11:07:53","modified_gmt":"2011-01-28T10:07:53","slug":"suphp-on-plesk-only-for-varwwwvhosts-on-centosfedoraredhat","status":"publish","type":"post","link":"https:\/\/kb.toderu.ro\/?p=370","title":{"rendered":"suPHP on plesk only for \/var\/www\/vhosts on centos\/fedora\/redhat"},"content":{"rendered":"<p>\t\t\t\tSince plesk 9.5, you can choose in plesk how php will run (as apache module will be executed as apache user, as cgi\/fastcgi will be executed as domain user\/system user)<\/p>\n<pre id=\"terminal\">wget -q -O - http:\/\/www.atomicorp.com\/installers\/atomic.sh | sh\nwget http:\/\/www.atomicrocketturtle.com\/RPM-GPG-KEY.art.txt\nrpm --import RPM-GPG-KEY.art.txt<\/pre>\n<pre id=\"terminal\">yum install mod_suphp<\/pre>\n<p>edit the \/etc\/httpd\/conf.d\/mod_suphp.conf and leave only LoadModule suphp_module modules\/mod_suphp.so line<br \/>\nmodify \/etc\/suphp.conf:<\/p>\n<pre id=\"terminal\">[global]\nlogfile=\/var\/log\/suphp.log\nloglevel=info\nwebserver_user=apache\ndocroot=\/var\/www\/vhosts\nallow_file_group_writeable=false\nallow_file_others_writeable=false\nallow_directory_group_writeable=false\nallow_directory_others_writeable=false\ncheck_vhost_docroot=false\nerrors_to_browser=false\nenv_path=\/bin:\/usr\/bin\numask=0022\nmin_uid=500\nmin_gid=500\n\n[handlers]\nx-httpd-php=\"php:\/usr\/bin\/php-cgi\"\nx-suphp-cgi=\"execute:!self\"\n<\/pre>\n<p>create file \/etc\/httpd\/conf.d\/zzz_suphp.conf with content:<\/p>\n<pre id=\"terminal\">&lt;Directory \/var\/www\/vhosts&gt;\n        &lt;IfModule mod_suphp.c&gt;\n               AddHandler x-httpd-php .php .php3 .php4 .php5 .phtml\n               suPHP_AddHandler x-httpd-php\n               suPHP_Engine on\n        &lt;\/IfModule&gt;\n&lt;\/Directory&gt;\n<\/pre>\n<p>With this config you will enable the suPHP only for vhost folder and not for webmail and other folders.<\/p>\n<p>You have also to check the file\/folders permissions. If you have files\/folders with 777 permission you will get a 500 error. You have to change it to 755 or 644.\t\t<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Since plesk 9.5, you can choose in plesk how php will run (as apache module will be executed as apache user, as cgi\/fastcgi will be executed as domain user\/system user) wget -q -O &#8211; http:\/\/www.atomicorp.com\/installers\/atomic.sh | sh wget http:\/\/www.atomicrocketturtle.com\/RPM-GPG-KEY.art.txt rpm &#8211;import RPM-GPG-KEY.art.txt yum install mod_suphp edit the \/etc\/httpd\/conf.d\/mod_suphp.conf and leave only LoadModule suphp_module modules\/mod_suphp.so line [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,5,10,11],"tags":[],"class_list":["post-370","post","type-post","status-publish","format-standard","hentry","category-apache","category-linux","category-php","category-plesk"],"_links":{"self":[{"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=\/wp\/v2\/posts\/370","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=370"}],"version-history":[{"count":0,"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=\/wp\/v2\/posts\/370\/revisions"}],"wp:attachment":[{"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=370"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=370"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=370"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}