1

I have an entire website with the following directory structure:

/example.com
    /html (public)
        /css
        /js
        index.php
    /lib
        session.php
        other_lib_files.php
    /views
        index.php
    /models
    /controllers

As illustrated, the html is public, and anything above it is private.

My site now needs to upgrade servers, and the new server (Linux w/ Plesk) has the following structure (reduced to the problematic parts below):

/myplesksite.com
    /httpdocs
        /css
        /js
        index.php
    /private
        /lib
        /models
        /views

What I would THINK is that I should be able to put my /lib, /views, /models, etc in the directory directly above /httpdocs, the same way I had it in my previous server.

Is that possible? Or do I have to put it in private?

I would really love not to have to adjust my internal paths throughout the site if not necessary...

johnnietheblack
  • 491
  • 2
  • 5
  • 11

2 Answers2

1

Because Plesk uses the php open_basedir to prevent access to other files outside the httpdocs folder and /temp from php

php_admin_value open_basedir "/var/www/vhosts/domain.com/httpdocs:/tmp"

If you have root access it is easy to change the conf file. If you do not have root access you can ask your hosting provider if they can do that.

Wesley
  • 32,690
  • 9
  • 82
  • 117
adam
  • 353
  • 2
  • 5
0

Your proposed structure should be fine.

womble
  • 96,255
  • 29
  • 175
  • 230
  • well, it wont let me put anything in /myplesksite.com ... only in /httpdocs or /private. and unfortunately, im having a hard time accessing /private from /httpdocs :( – johnnietheblack Jan 20 '10 at 02:33