root directories (formatted clearly this time)

Web hosting discussion, programming, and shared and dedicated servers.
3 posts Page 1 of 1
by racerlupine » Sat Jul 20, 2019 4:39 pm
(Let me try that time I'll remember to Preview before I Submit...thanks for your patience...)

I've had Sonic as my ISP for several years. I was running a small private site at . Recently I started hosting my domain on Sonic, and moved my site over to the domain at* . So the (abridged) top of my tree is:


1. "racerlupine" is my root directory, okay, but seems to me "" should be the root for everything underneath that. But that appears not to be the case.

2. I need a directory that's not web visible for password files and stuff. If I chmod racerlupine to hide it from users won't that affect all the subdirectories too?

3. On my Apache install at home "htdocs" is the server root directory. That (abridged) tree is:

-+logs I made a subdirectory "files" in "Apache24" for files I need but don't want web visible. Can I do something similar on Sonic?

Thanks in advance.

by drew.phillips » Mon Jul 22, 2019 4:49 pm
1. You now have 2 web roots. One for "mini hosting" (/home/WWW_pages/racerlupine) and then one for your virtual hosting directory located at (/home/WWW_pages/

2. Setting restrictive permissions on one of the root directories may prevent Apache from accessing subdirectories so I would not recommend that.

For any directory you don't want visible on the web, you can add the following to a .htaccess file in that directory:

Code: Select all

<IfModule !mod_authz_core.c>
    Order Allow,Deny
    Deny from all

<IfModule mod_authz_core.c>
    Require all denied

This will prevent any clients from being able to access the contents of that directory, and any subdirectory.

For example you could store the files in /home/WWW_pages/racerlupine/private/ and add the .htaccess with the deny rules there. No one will be able to access that directory except for your code and .htaccess files referencing any passwd files there.
Drew Phillips
Programmer / System Operations,
by racerlupine » Mon Jul 22, 2019 9:46 pm

This is just what I was after, many many thanks.

3 posts Page 1 of 1

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 5 minutes)
Most users ever online was 999 on Mon May 10, 2021 1:02 am

Users browsing this forum: No registered users and 2 guests