• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

HowTo: Create a scripts enabled directory below the webroot

D

DaanK

Guest
How can i create a script enabled directory?

I need to place the configs/includes and classes outside of the http_docs

i've been looking at the /tmp , but i assume that this dir is cleared from time to time?
 
Welcome to the comPlesk control panel!

Create vhost.conf AND vhost_ssl.conf files with the following information, and put them in your domain's 'conf' directory.

Code:
<Directory /full/path/to/the/directory/httpdocs>
php_admin_value open_basedir none
</Directory>

<Directory /full/path/to/the/directory/httpdocs>
php_admin_value open_basedir /full/path/to/dir
</Directory>

For the vhost_ssl.conf just use "httpsdocs" instead

In place of "/full/path/to/dir" in the second last line in the code, you can simply use "/" but that would open up more directories, so be careful when you give such permission to your clients.

Run the following after editing vhost.conf and vhost_ssl.conf:
Code:
/usr/local/psa/admin/sbin/websrvmng -u --vhost-name=domain.com
Restart your Apache:

Code:
# /etc/rc.d/init.d/httpd restart

Hope this helps.

Sam
 
ok .. based on the above here , this is what i did

i created an directory files as root and chown'd it to the domainuser, i also chmod'd it to 751

i then created the vhost.conf as above , and voila i got myself an directory where scripts can be executed , and where i could create dirs/files through ftp
 
Back
Top