• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Default test.cgi script does not executes from newly created domain with enabled CGI

metalalisa

Basic Pleskian
Code:
# uname -a
Linux ***** 2.6.18-238.12.1.el5.centos.plus #1 SMP Wed Jun 1 11:12:25 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux

Code:
# cat /etc/redhat-release
CentOS release 5.6 (Final)

Code:
# rpm -q psa
psa-10.2.0-cos5.build1011110331.11

Code:
# cat 13076900830.12376900_httpd.include
# ATTENTION!
# DO NOT MODIFY THIS FILE OR ANY PART OF IT. THIS CAN RESULT IN IMPROPER PLESK
# FUNCTIONING OR FAILURE, CAUSE DAMAGE AND LOSS OF DATA. IF YOU REQUIRE CUSTOM
# MODIFICATIONS TO BE APPLIED TO THE CONFIGURATION, PLEASE, PERFORM THEM IN THE
# FOLLOWING FILE(S):
#/var/www/vhosts/host.com/conf/vhost.conf

<VirtualHost *.*.*.*:80>
    ServerName "host.com:80"
        ServerAlias  "www.host.com"
        UseCanonicalName Off

<IfModule mod_suexec.c>
    SuexecUserGroup "host_com" "psacln"
</IfModule>

    ServerAdmin  "admin@host.com"

        DocumentRoot "/var/www/vhosts/host.com/httpdocs"
    CustomLog /var/www/vhosts/host.com/statistics/logs/access_log plesklog
    ErrorLog  "/var/www/vhosts/host.com/statistics/logs/error_log"


<IfModule mod_userdir.c>
    UserDir "/var/www/vhosts/host.com/web_users"
</IfModule>

    ScriptAlias  "/cgi-bin/" "/var/www/vhosts/host.com/cgi-bin/"

    Alias  "/plesk-stat" "/var/www/vhosts/host.com/statistics"
    <Location  /plesk-stat/>
        Options +Indexes
    </Location>
    <Location  /plesk-stat/logs/>
        Require valid-user
    </Location>
    Alias  /webstat /var/www/vhosts/host.com/statistics/webstat
    Alias  /webstat-ssl /var/www/vhosts/host.com/statistics/webstat-ssl
    Alias  /ftpstat /var/www/vhosts/host.com/statistics/ftpstat
    Alias  /anon_ftpstat /var/www/vhosts/host.com/statistics/anon_ftpstat

    Alias  /awstats-icon /var/www/html/awstats

    <IfModule mod_ssl.c>
        SSLEngine off
    </IfModule>

    <Directory /var/www/vhosts/host.com/httpdocs>

<IfModule sapi_apache2.c>
php_admin_flag engine on
php_admin_flag safe_mode on
php_admin_value open_basedir /var/www/vhosts/host.com/httpdocs/:/tmp/
</IfModule>

<IfModule mod_php5.c>
php_admin_flag engine on
php_admin_flag safe_mode on
php_admin_value open_basedir /var/www/vhosts/host.com/httpdocs/:/tmp/
</IfModule>

        Options -Includes +ExecCGI

    </Directory>

</VirtualHost>


Code:
# pwd
/var/www/vhosts/host.com/cgi-bin/test

# ls -l
-rwxr-xr-x 1 host_com psacln 671 Jun 10 11:24 test.cgi

Code:
# tail error_log
[Fri Jun 10 11:45:12 2011] [error] [client *.*.*.*] (13)Permission denied: exec of '/usr/sbin/suexec' failed
[Fri Jun 10 11:45:12 2011] [error] [client *.*.*.*] Premature end of script headers: test.cgi
[Fri Jun 10 11:46:14 2011] [error] [client *.*.*.*] (13)Permission denied: exec of '/usr/sbin/suexec' failed
[Fri Jun 10 11:46:14 2011] [error] [client *.*.*.*] Premature end of script headers: test.cgi

Code:
# ls -l /usr/sbin/suexec
lrwxrwxrwx 1 root root 32 Apr 25 20:19 /usr/sbin/suexec -> /usr/local/psa/suexec/psa-suexec
 
Looks like that /usr/sbin/suexec has been overwritten. Try to copy /usr/local/psa/suexec/psa-suexec over /usr/sbin/suexec and restart Apache.
 
No, there shouldn't be symlink:

# ls -la /usr/sbin/suexec
-r-s--x--- 1 root apache 22520 Mar 31 11:10 /usr/sbin/suexec
 
Back
Top