03 Oct 2006
I just solved a problem that I gave up upon once - I tried again and succeeded at last. Such things feel great :-)
So maybe the combination of words I use here will help others to google the solution quicker.

When you set up an Apache Webserver, you might want to develop your files somewhere else, say, somewhere in your user directory (Apache normally resides in some system directory and it's not convenient to go there for development).

You'll soon find out that you need to make two changes to httpd.conf:
Change DocumentRoot to your home directory and change the corresponding <Directory "...path..."> entry to the same path. Then restart Apache.

Now when you browse your home directory, you might get an error, telling you that you don't have the permission to see anything there.

I spent a long time reading forum posts in the internet and fiddling around with the permissions of that DocumentRoot folder I wnated to use and its contents.
I used chmod to change the permission settings - no success.
I used chown to change the user and group who own the folder and its contents to 'www' (the default within httpd.conf) - no success. (By the way, always use the -R option, so you'll change all the content's ownership in that folder recursively)

Then I read this post that dealed with something different, but reading to the bottom was worthwile:
The whole path to your DocumentRoot folder must be accessible by the Group (and User) specified in httpd.conf. (I guess this holds when DocumentRoot is not within the Apache home directory)
So I changed the Group and User in httpd.conf to 'nic' (which is me on my local machine and I own the whole path to that directory), resetted all the ownerships on my development folder to 'nic' and it worked!

Note: Of course no one would want to do this in a production environment! This is just for testing on your local machine.
# lastedited 03 Oct 2006
follow comments per RSS     
  on31 Jul 2008 - 4:29 fromagentzh wwwhttp://blog.agentzh.org
Hmm, I think a better solution is creating a symbolic link under /var/www/, as in $ sudo ln -s /home/agentz/dev-site /var/www/agentz and then setting DocumentRoot to /var/www/agentz. No 403 any more, and you can still do development in your own home ;)
[link]
  on05 Apr 2009 - 9:25
[link]
  on25 Aug 2009 - 18:13 fromArnon Weinberg wwwhttp://www.back2front.ca

Just wanted to note that my particular permissions problem turned out to be with SELinux, which is on by default on many installations, but runs mostly silently, so you'd never know unless you check.  I had tried sym-linking the document root, a subdirectory, changing permissions, ownership, even moving the files didn't help.  Presumably configuring SELinux would work, but I just turned it off to demonstrate that it was the problem.

[link]
  on20 Oct 2009 - 13:22 fromAdam M

You dont need to change user nor group. What you need to do is to just edit another line in httpd.conf. There are 2 of them which need to be changed.

DocumentRoot"C:/my/new/path"

<Directory "C:/my/new/path">

[link]
  on20 Oct 2009 - 14:06 fromNic

Adam:

I did those changes (and the article mentions that if you actually read it). That didn't do it for me.

You seem to be on a Windows PC and maybe this post only applies to Mac OSX. The original hint I used is on macosxhints.com)

[link]
  on15 Sep 2010 - 9:36 fromRtz

I agree with "Adam M".

It start working as we changed path in both of lines.

[link]
  on09 Mar 2012 - 3:18 fromrusty

Very old post but still.... Nic, many thanks for your help. Should solve my problem. Rtz and Adam M just dont seem to read (think) before they post

[link]
  on12 Sep 2012 - 23:39 fromvictor

 Thanks for the tip - it solved my issue!

[link]
  on24 Feb 2013 - 22:07 fromalex

 still actual, thanks !

[link]
  on15 Jan 2017 - 5:47 fromRuslinsitty wwwhttp://clanar.com
[link]
  on25 Aug 2017 - 13:56 frompurchaseadobepremiere wwwhttp://oemadobe.us
[link]
  on26 Aug 2017 - 16:07 frombuyadobepremierepro wwwhttp://oemadobe.us
[link]
  on26 Aug 2017 - 22:23 frombuyadobepremierepro wwwhttp://oemadobe.us
[link]
  on27 Aug 2017 - 3:51 frombuyadobepremierepro wwwhttp://oemadobe.us
[link]
  on27 Aug 2017 - 12:04 frombuyadobepremierepro wwwhttp://oemadobe.us
[link]
  on27 Aug 2017 - 23:09 frombuyadobepremierepro wwwhttp://oemadobe.us
[link]
  on28 Aug 2017 - 8:02 frompurchaseadobepremiere wwwhttp://oemadobe.us
[link]
  on28 Aug 2017 - 13:35 frompurchaseadobepremiere wwwhttp://oemadobe.us
[link]
  on29 Aug 2017 - 15:59 fromBDSM wwwhttp://bdsmcoollection.com/
[link]
  on29 Aug 2017 - 19:04 fromBDSM wwwhttp://bdsmcoollection.com/
[link]
  on31 Aug 2017 - 23:22 fromhentai porno wwwhttp://hentaiblog.org/
[link]
  on01 Sep 2017 - 11:03 fromTimothyjem wwwhttp://msssoftware.us
[link]
  on02 Sep 2017 - 0:47 fromTimothyjem wwwhttp://objectsoft.us
[link]
  on02 Sep 2017 - 5:08 fromTimothyjem wwwhttp://linksoft.us
[link]
  on02 Sep 2017 - 12:13 fromTimothyjem wwwhttp://linksoft.us
[link]
  on03 Sep 2017 - 0:13 fromTimothyjem wwwhttp://msssoftware.us
[link]
  on03 Sep 2017 - 5:08 fromTimothyjem wwwhttp://msssoftware.us
[link]
  on03 Sep 2017 - 8:42 fromTimothyjem wwwhttp://linksoft.us
[link]
  on04 Sep 2017 - 0:20 fromTimothyjem wwwhttp://linksoft.us
[link]
  on05 Sep 2017 - 12:39 fromxxx porno wwwhttp://xxxzzle.com/
[link]
  on05 Sep 2017 - 15:43 fromxxx porno wwwhttp://xxxzzle.com/
[link]
  on06 Sep 2017 - 0:21 fromxxx porno wwwhttp://xxxzzle.com/
[link]
  on09 Sep 2017 - 3:04 frombuyadobepremierepro wwwhttp://oembuy.us/shop/acdsee-video-studio-1-0/
[link]
  on09 Sep 2017 - 17:23 frombuyadobepremierepro wwwhttp://oembuy.us/shop/originlab-originpro-2016/
[link]
  on21 Sep 2017 - 5:18 frominstallmentloans wwwhttp://https://installmentloansmaster.org/
[link]
You are seeing a selection of all entries on this page. See all there are.