Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

Folders outside public_html

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
2 posts • Page 1 of 1
MrFwibble
Posts: 4
Joined: Sun Jan 08, 2017 8:53 pm

Folders outside public_html
  • Quote

Post by MrFwibble » Sun Jan 08, 2017 9:49 pm

I have been working on a new VPS, Centos7 with VestaCP and one of the sites is hosting WHMCS.

WHMCS recommends to put certain folders outside public_html so they can't be accessed from the Internet.

However, since moving the site from cPanel to Vesta I am seeing errors if I try this, so creating a folder such as:
/home/useraccount/web/domain.co.uk/whmcs/

I get an error in WHMCS:
"The following directories are owned by a different user from that which is executing WHMCS. This indicates a potentially insecure configuration"

I have double checked and the folder is owned by the correct account. I have deleted it, created it and chown it. No difference.

Is there a config that is preventing this folder from being accessed?

Cheers
David
Top

atmark
Posts: 5
Joined: Sun Jan 24, 2016 9:59 pm

Re: Folders outside public_html
  • Quote

Post by atmark » Wed Feb 15, 2017 9:20 pm

Hi!
For access you want to disable open_basedir, but I didn't want a complete shutdown.
I have solved this question so:
1. Created folder /home/%USER%/web/%DOMAIN%/hide
2. Created folder /home/%USER%/web/%DOMAIN%/hide/templates_c and other what you want.
Set chmod 777 as requested WHMCS
3. Edit file: /home/%USER%/conf/web/httpd.conf
In section: <Directory /home/%USER%/web/%DOMAIN%/public_html>
Edited line:
php_admin_value open_basedir /home/%USER%/web/%DOMAIN%/public_html:/home/%USER%/web/%DOMAIN%/hide:/home/%USER%/tmp
( add in string: /home/%USER%/web/%DOMAIN%/hide:)

I used the "default"template
%USER% and %DOMAIN% - change to your values

Enjoy!
Top


Post Reply
  • Print view

2 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password