Koozali.org: home of the SME Server

apache document root

baddog

apache document root
« on: August 03, 2003, 02:59:25 AM »
Could someone explain why I cannot view any documents in any subfolder in apache's document root?  I get a response that the document is forbidden. example... I create a web in document root and I create a folder in the same root and move my files into this dir.  Permissions remain the same, yet I cannot view them with a browser. I get "You are not authorized to view this page".  Can anyone help?

rick

Re: apache document root
« Reply #1 on: August 03, 2003, 03:14:11 AM »
do you get the same error message in your browser if you use https ?

Tom Haynes

Re: apache document root
« Reply #2 on: August 03, 2003, 05:17:26 AM »
What are the permissions of the created directory?

They should be 755.

baddog

Re: apache document root
« Reply #3 on: August 03, 2003, 05:17:29 AM »
Thanks for the reply Rick.  Interesting thought.  I did try after you suggested it, https access and it prompted me to continue and then I was displayed the same message as previously noted.  I should mention I am running phpmyadmin in a subdirectory within the doc root without any issues and I left httpd.conf at it's default

???

baddog

Re: apache document root
« Reply #4 on: August 03, 2003, 05:22:18 AM »
Tom, Thanks for the reply.  To confirm, the permissions of the created directory are drwxrwxrwx.  the phpmyadmin directory has permissions set at drwxr-sr-x.

I set the permissions to 777 to eliminate any conflicts with permissions. I think it's a setting in httpd.conf, but I have no idea what I'm looking for.

Wes

Jon Blakely

Re: apache document root
« Reply #5 on: August 03, 2003, 08:12:22 AM »
baddog,

When you say you have created a directory in the document root, where exactly are you talking about.
SME server uses  /home/e-smith/files/primary/html
as its document root as per httpd.conf.
If you have it anywhere else you will need to create an alias entry in httpd.conf via the template system.

Jon

baddog

Re: apache document root
« Reply #6 on: August 03, 2003, 01:42:09 PM »
Jon, Thanks for the reply.

I have create a new dir called /home/e-smith/files/primary/html/new_dir as an example.  I create a index file in this dir or copy anything into it and I get the forbidden message when I try to view it.  I directly copied phpmyadmin directly into the document root resulting in the path /home/e-smith/files/primary/html/phpmy admin and I have no access issues with it.

Nevermind guys, I just solved the issue.  I had a created the above directory with a name equating the machine name.  Obviouly that's a no-no in the linux world.

To anyone watching this thread, thanks for the input!  

However, I do have one more query.  Any thoughts on a quick and easy way to user & password protect the above mentioned directory.  All I need is a point to the right direction.  I can figure out the details.

Wes

Tom Haynes

Re: apache document root
« Reply #7 on: August 03, 2003, 05:22:18 PM »

baddog

Re: apache document root
« Reply #8 on: August 03, 2003, 08:02:55 PM »
Thank you Tom!  

I looked over some references to htaccess and that will just what I need!

Wes