# Apache2 DocumentRoot moved from to /var/www/localhost ?

## meulie

Howdy!

Just did an emerge -u apache and now it seems that my documentroot has suddenly moved from /home/httpd/ to /var/www/localhost

Why is this?

----------

## devon

Did you install apache-2.0.47-r1? From the ebuild

```
#Standard location for Gentoo Linux

DATADIR="/var/www/localhost"
```

Why this was changed I do not know.

----------

## meulie

 *devon wrote:*   

> Did you install apache-2.0.47-r1? From the ebuild
> 
> ```
> #Standard location for Gentoo Linux
> 
> ...

 

Yup, that's the one emerge wished to unleash on my system...   :Cool: 

Well, it took me some editing and moving of files, but now Apache is once again fully operational, with all it's files in their new location.

I just hope that r2 isn't gonna move the location again/back...    :Confused: 

----------

## paul138

That was very irritating. I really wish there was some sort of early warning system for this, moving the apache directory after well over a year of using it in /home was a very poor decision IMHO.

----------

## MoonWalker

Well if you make it a habbit to read the Changelog before updating, at least critical packages, there you have your warning and you wouldn't be so surprised  *Changelog wrote:*   

>  Move --datadir to /var/www/localhost; prepare for the upcoming vhost-config
> 
>   and webapp-config tools.

  Appearently there is a head, I mean a thought, behind this.

----------

## meulie

And did you read this Changelog before or after you read this thread?    :Cool: 

----------

## Steffen

I think it makes sense to store the files served by apache in /var/www/localhost/, but now that we are talking about this issue: Why is mysql data stored in /var/lib/mysql/? Wouldn't /var/mysql/ be more logical? Or is my understanding of a lib dir wrong?

----------

## MoonWalker

 *meulie wrote:*   

> And did you read this Changelog before or after you read this thread?

  I read it after, as I use to check this forum while I make a "#emerge sync", but it doesn't make any diff... I always read the Changelog and this forum before I upgrade as I run ~arch. To me it makes sense   :Wink: 

----------

## MoonWalker

I agree though, such critical change is worth a special announce and maybe this threed should be made sticky as it appear to break things, if you not are prepared. I'm still to upgrade apache, compiling the new gcc now and then postfix with the 'verisign patch' added, then I will go for apache... after I have prepared for the path change  :Smile: 

----------

## paul138

Yeah, drastic changes should require someone to post something, anything, to prepare us for changes like that. Of course, there may have been a notice at the end of the build but alas, it may have flown by in a mess during package cleanup. I'm not bitter, I just feel that some things require  more attention.

----------

## meulie

 *MoonWalker wrote:*   

> Well if you make it a habbit to read the Changelog before updating, at least critical packages, there you have your warning and you wouldn't be so surprised

 

Then I have a nice newbie/FAQ for you. How do I read a Chancelog of a package before/without actually installing it?    :Question: 

----------

## Steffen

```
emerge apache -pl
```

----------

## meulie

Thank you, oh wise n00b!    :Cool: 

----------

## paul138

 *Steffen wrote:*   

> 
> 
> ```
> emerge apache -pl
> ```
> ...

 

What is that supposed to do? It does nothing here.

----------

## meulie

 *paul138 wrote:*   

>  *Steffen wrote:*   
> 
> ```
> emerge apache -pl
> ```
> ...

 

RTFM...  or...  

```
man emerge
```

  :Cool: 

----------

## paul138

RTFM?!  :Evil or Very Mad: 

Does this display the changelog on your system? Not here.

----------

## Steffen

It only displays the changelog entries since the version you currently have installed was released. Therefore, if you already have the most recent version, there is nothing to be displayed. In this case you could still do the following:

```
nano /usr/portage/net-www/apache/Changelog
```

----------

## MoonWalker

Woe watchout! I just ran #rev-dep to relink deps from openssl-0.9.6 to 0.9.7 which causes an apache recompile. Although it recompiles the current installed version (2.0.47) and not the latest r1 rev. it generates a new apache2.conf with the 

```
DocumentRoot /var/www/localhost/htdocs
```

 directive. Probably due to use same template file in /usr/portage/net-www/apache/files/ (havn't checked). So note: path changes on re-compile of 2.0.47 as well! That is if you accept all changes and replace the file, of cause - like when running #etc-update, but the new apache2.conf can safely be discarded (on re-compile of 2.0.47)

Btw meulie, maybe you could write a few lines of the problem you ran into and what you have to do fixing it. It could be of help to others and would be an creative approach   :Wink: 

Also this threed really should be made sticky, there's lot of space for it at to so I don't see why not.

----------

## Wolfpack98

I just noticed this issue myself while building my replacement server.  I'm not particularily happy about this problem.

The main problem I've noticed is that the ebuild still builds /home/httpd and not /var/www/localhost (or whatever) which causes me grief.  One can create /var/www and then create the directories needed.  I personally run various virtual hosts and Gentoo is, by so far, the best system I've had a opportunity to successfully run V-hosts on with minimal configurations.

My main issue is the fact this particular ebuild does *NOT* create /var/www for you, and you have to manually do this.    :Evil or Very Mad: 

I haven't filed a bug report yet, but if I can't find one in bugs.gentoo.org I will.   :Twisted Evil: 

----------

## MoonWalker

I filed a bug about before https://bugs.gentoo.org/show_bug.cgi?id=29744 so go on and tell the devs   :Wink: 

have also asked for this threed to be made sticky.

----------

## Wolfpack98

Well, I am on freenode right now... just not in the dev channel.  Hehe

----------

## mlang

 *Wolfpack98 wrote:*   

> 
> 
> My main issue is the fact this particular ebuild does *NOT* create /var/www for you, and you have to manually do this.    

 

What's worse is that not only does it NOT create /var/www, it DOES create /home/httpd/ and put everything there.

----------

## Genone

btw, http://www.gentoo.org/proj/en/glep/glep-0011.html explains the reasons behind this change and additional changes that will come in the future.

----------

