Installing outside of public_html

Permalink
Hi All,

I was wondering if anyone has managed to install the core of concrete 5 outside of public_html and run a site as normal?

Thanks,
Marc

 
mnakalay replied on at Permalink Reply
mnakalay
That would be an awesome possibility if only for security reasons. I'd love to know to.
makeyourmarc replied on at Permalink Reply
I'm going to give it a shot just wondered if anyone else had give it a try, got it to work, was running C5 in a similar way or could tell me it was impossible.

Thanks,
Marc
JohntheFish replied on at Permalink Reply
JohntheFish
If you get it working, please write it up as a howto.
VPenkov replied on at Permalink Reply
VPenkov
Move the concrete directory to somewhere else, assign read-only permissions and create a symlink where it used to be.
mnakalay replied on at Permalink Reply
mnakalay
sounds a bit like how you would do for a multi-site installation with a single core no?
makeyourmarc replied on at Permalink Reply
Hi Everyone,

I've managed to get something in place, without any sym-linking.I'll post up exactly what I did later this afternoon when I'm not at work.

But I've basically moved everything out of public_html except for the files directory (where uploads go) and the concrete/css js and themes folders. Should give me a greater level of security which is the overall plan.

I haven't had a chance to fully test anything just yet but the basic editing etc seems to be working fine.

I'll follow up later on and let you guys know what ive moved and what i've changed.

Thanks,
Marc
mnakalay replied on at Permalink Reply
mnakalay
That's awesome. I'm looking forward to hearing about this
makeyourmarc replied on at Permalink Reply
Hi Guys,

Okay forgot to mention I'm running 5.6.3.3 as most of my customers sites are on this and I feel i'm going to have difficulty in upgrading and retraining all, but as one of the sites has been continually hacked its prompted this.

So I've completed a install with all folders in public_html, then I've moved everything above public_html except for the following

concrete/config/base_pre.php in which I have updated the following (line 4) - define('DIR_BASE', dirname(realpath($_SERVER['SCRIPT_FILENAME']))); to
define('DIR_BASE', realpath(dirname($_SERVER['SCRIPT_FILENAME']).'/../'));

I also have the css, js, themes and images directories in public_html/concrete along with dispatcher.php which I have modified line 2 from $cdir = dirname(__FILE__); to $cdir = dirname(__FILE__) . '/../../concrete/';

everything else is outside of public_html

It seems to work great so far if anyone would like a zipped up copy I can upload so that you can see the exact structure. I've still to tidy things up a bit as i'd like to put all the directories above public_html into another directory such as core for example so that in my root I have core and public_html so that things are a lot tidier.

I'm still running through and testing but everything seems okay so far. All input is more than welcome

Kind Regards,
Marc