• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

httpsdocs and httpdocs the same - errors!

D

Dan F

Guest
Hi guys.

I hope you can help me out please...

I've just managed to get a dedicated SSL certificate and I want to enable my users to use the https:// area of my site. The content will be no different from my main httpdocs, so I've symlinked them (found on Google) with:

Code:
# ln -sv httpdocs httpsdocs
# chown -h dan:psaserv httpsdocs

this works fine for a normal .html file or a .php file that has no includes(), however, for any of my others I receive the following PHP error:

Code:
Warning: require_once(): open_basedir restriction in effect. File(/srv/www/vhosts/domain/connect/functions.php) is not within the allowed path(s): (/srv/www/vhosts/domain/httpsdocs/:/tmp/) in /srv/www/vhosts/domain/httpdocs/functions.php on line 32 Warning: require_once(/srv/www/vhosts/domain/connect/functions.php): failed to open stream: Operation not permitted in /srv/www/vhosts/domain/httpdocs/functions.php on line 32 Fatal error: require_once(): Failed opening required '/srv/www/vhosts/domain/connect/functions.php' (include_path='.:/usr/share/php5:/usr/share/php5/PEAR') in /srv/www/vhosts/domain/httpdocs/functions.php on line 32

... the 'connect' directory contains my main functions.php and other related files.

I've made sure my vhost.conf in 'conf' says:

Code:
<Directory /srv/www/vhosts/domain/httpdocs>
php_admin_value safe_mode off
php_admin_value open_basedir none
</Directory>

and done the same for "vhost_ssl.conf" to no avail.

I even tried turning "open_basedir = none" in /usr/local/psa/admin/conf/php.ini

Any help would be greatly appreciated...!
 
Oh and just to add I've restarted apache, and also done:

Code:
/usr/local/psa/admin/sbin/websrvmng -u --vhost-name=domain

yet if I "grep basedir *" inside my conf folder, I only see:

Code:
conf # grep "basedir" *
12902913590.15018200_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpsdocs/:/tmp/
12902913590.15018200_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpsdocs/:/tmp/
12902913590.15018200_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpdocs/:/tmp/
12902913590.15018200_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpdocs/:/tmp/
12902913590.15018200_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/subdomains/staffing/httpdocs/:/tmp/
12902913590.15018200_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/subdomains/staffing/httpdocs/:/tmp/
12902919200.38317700_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpsdocs/:/tmp/
12902919200.38317700_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpsdocs/:/tmp/
12902919200.38317700_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpdocs/:/tmp/
12902919200.38317700_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpdocs/:/tmp/
12902919200.38317700_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/subdomains/dan/httpdocs/:/tmp/
12902919200.38317700_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/subdomains/dan/httpdocs/:/tmp/
12902919200.38317700_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/subdomains/staffing/httpdocs/:/tmp/
12902919200.38317700_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/subdomains/staffing/httpdocs/:/tmp/
12902927020.83241000_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpsdocs/:/tmp/
12902927020.83241000_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpsdocs/:/tmp/
12902927020.83241000_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpdocs/:/tmp/
12902927020.83241000_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpdocs/:/tmp/
12902927020.83241000_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/subdomains/dan/httpdocs/:/tmp/
12902927020.83241000_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/subdomains/dan/httpdocs/:/tmp/
12902927020.83241000_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/subdomains/staffing/httpdocs/:/tmp/
12902927020.83241000_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/subdomains/staffing/httpdocs/:/tmp/
12902927170.50077600_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpsdocs/:/tmp/
12902927170.50077600_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpsdocs/:/tmp/
12902927170.50077600_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpdocs/:/tmp/
12902927170.50077600_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpdocs/:/tmp/
12902927170.50077600_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/subdomains/dan/httpdocs/:/tmp/
12902927170.50077600_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/subdomains/dan/httpdocs/:/tmp/
12902927170.50077600_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/subdomains/staffing/httpdocs/:/tmp/
12902927170.50077600_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/subdomains/staffing/httpdocs/:/tmp/
13029166590.83014300_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpsdocs/:/tmp/
13029166590.83014300_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpsdocs/:/tmp/
13029166590.83014300_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpdocs/:/tmp/
13029166590.83014300_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpdocs/:/tmp/
13029166590.83014300_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/subdomains/staffing/httpdocs/:/tmp/
13029166590.83014300_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/subdomains/staffing/httpdocs/:/tmp/
13043239800.87163200_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpsdocs/:/tmp/
13043239800.87163200_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpsdocs/:/tmp/
13043239800.87163200_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpdocs/:/tmp/
13043239800.87163200_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpdocs/:/tmp/
13043239800.87163200_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/subdomains/staffing/httpdocs/:/tmp/
13043239800.87163200_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/subdomains/staffing/httpdocs/:/tmp/
13043243100.13130300_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpsdocs/:/tmp/
13043243100.13130300_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpsdocs/:/tmp/
13043243100.13130300_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpdocs/:/tmp/
13043243100.13130300_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpdocs/:/tmp/
13043243100.13130300_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/subdomains/staffing/httpdocs/:/tmp/
13043243100.13130300_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/subdomains/staffing/httpdocs/:/tmp/
13043248550.95127400_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpsdocs/:/tmp/
13043248550.95127400_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpsdocs/:/tmp/
13043248550.95127400_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpdocs/:/tmp/
13043248550.95127400_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpdocs/:/tmp/
13043248550.95127400_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/subdomains/staffing/httpdocs/:/tmp/
13043248550.95127400_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/subdomains/staffing/httpdocs/:/tmp/
13043250660.03348200_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpsdocs/:/tmp/
13043250660.03348200_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpsdocs/:/tmp/
13043250660.03348200_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpdocs/:/tmp/
13043250660.03348200_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpdocs/:/tmp/
13043250660.03348200_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/subdomains/staffing/httpdocs/:/tmp/
13043250660.03348200_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/subdomains/staffing/httpdocs/:/tmp/
13043259670.19354300_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpsdocs/:/tmp/
13043259670.19354300_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpsdocs/:/tmp/
13043259670.19354300_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpdocs/:/tmp/
13043259670.19354300_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpdocs/:/tmp/
13043259670.19354300_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/subdomains/staffing/httpdocs/:/tmp/
13043259670.19354300_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/subdomains/staffing/httpdocs/:/tmp/
13043271010.82496600_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpsdocs/:/tmp/
13043271010.82496600_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpsdocs/:/tmp/
13043271010.82496600_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpdocs/:/tmp/
13043271010.82496600_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/httpdocs/:/tmp/
13043271010.82496600_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/subdomains/staffing/httpdocs/:/tmp/
13043271010.82496600_httpd.include:php_admin_value open_basedir /srv/www/vhosts/domain/subdomains/staffing/httpdocs/:/tmp/
vhost.conf:php_admin_value open_basedir none
vhost-ssl.conf:php_admin_value open_basedir none
 
Instead of using a symlink, I'd just tick 'Use a single directory for housing SSL and non-SSL content' in the domain's web hosting setup in Plesk. I'd undo the symlink first.
 
Back
Top