• 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

Directory under /httpdocs

L

lpittman

Guest
Howdy!

I'd like to create a folder below /httpdocs for files like database includes (which hold passwords) so it is not accessible by the public, but still accessible by php. I know this is possible, but can't remember how I do it (something with the vhost.conf?) ... any guidance would be appreciated!

Thanks,
Luke
 
Just to be on topic, how can I allow the domain user to create a folder one level below httpdocs? It seems to have permissions problem.

By default if you created domain.com in Plesk, the user will not have permission to write into /var/www/vhosts/domain.com unless I think if you explicitly use root to chown the dir to the user, it should work. But then again, what should be the correct way of doing such things. I am pretty confuse by what Plesk can help administrators. The documentation are only useful for the admin control panel.
 
A client can't just do this. Login as root, create the directory and use chown to set the client as the owner (and you'll probably want to add this dir to the open_basedir path if PHP is in the mix).
 
Hmm, what effect will there be if i chown the vhosts/domain.com to the domain user? Will it be too insecure?

As for the open_basedir, where can I put the php_admin_value if I wish to apply to the whole server? instead of just in a vhost.conf? I just read that you can put in as a skel. But how about just one file which will affect all sites?
 
Setting a global open_basedir path won't work because the domain specific open_basedir entries (in httpd.include or optional ones in a vhost.conf) will override the global open_basedir setting.
 
Back
Top