# Apache not working after update 404 error

## shgadwa

I just finished updating world (FINALLY). It took forever. Numerous dependency issues. Also python was driving me crazy. Anyhow, solved that... now everything is updated. The problem is that now apache doesn't work, at all. Before the update finished, apache works but php did not. Now that its fully updated and I moved over to gnome3 (which I think is unrelated), apache doesn't work. It starts up fine. I do get a 'could not determine server's host name' error, but that happened before and it still worked fine.

```
atlantis ~ # /etc/init.d/apache2 restart

 * Stopping apache2 ...

apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName                                            [ ok ]

 * Starting apache2 ...

apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName                                            [ ok ]

atlantis ~ # 

```

Nevertheless, I cannot access any web page, at all. Even if I just go to http://localhost/ I get a 404 error. I checked apache's error.log and it gives me a lot of file not found errors. You can find the file here: http://pastebin.mozilla.org/1281946

I got on freenode and #httpd says that either my content is messed up or I have a rewrite rules problem. I don't think its my content. Everything worked fine before the update. 

I ran the apache2 script (httpd binary... no idea why gentoo changed the name).  That came back fine. Says syntax is ok. Also the document root is /var/www/localhost/htdocs, and thats where I have my files.

I'm wondering if this might have something to do with modules, as apache modules are completely different in 2.2. Now I have to add them into /etc/make.conf. I'm not even sure which ones to put in there but I put three that it said were necessary for a successful install. 

Here is my make.conf:

```

# These settings were set by the catalyst build script that automatically

# built this stage.

# Please consult /etc/make.conf.example for a more detailed example.

CFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"

CXXFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"

LDFLAGS="-Wl,--as-needed"

# WARNING: Changing your CHOST is not something that should be done lightly.

# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.

CHOST="i686-pc-linux-gnu"

USE="-hal gtk cdda kdrive sqlite print nsplugin extras -minimal emerald curl glitz svg xcb -xfce4 \

     gnome -kde -qt3 -qt4 mp3 spell java cairo xulrunner dri opengl \

     truetype alsa cdr png quicktime samba xcomposite caps acpi \

     type1 cleartype corefonts -firefox udev dbus consolekit"

VIDEO_CARDS="intel"

INPUT_DEVICES="evdev synaptics"

MAKEOPTS="-j3"

source /var/lib/layman/make.conf

#GENTOO_MIRRORS="ftp://130.208.16.26/pub/gentoo/ ftp://130.208.16.31/pub/gentoo/ http://mirror.bytemark.co.uk/gentoo/"

DISTDIR="/distfiles"

PORTDIR_OVERLAY="/var/lib/layman/gnome"

FEATURES="-ccache"

#CCACHE_DIR="/var/tmp/ccache"

#CCACHE_SIZE="2G"

ACCEPT_LICENSE="skype-eula dlj-1.1 PUEL AdobeFlash-10"

EMERGE_DEFAULT_OPTS="--autounmask=n"

APACHE2_MODULES="authz_host dir mime"
```

Any help would be appreciated.

----------

## chiefbag

If you want to use PHP support in apache make sure you use apache2 use flag for php

/etc/portage/package.use

```
dev-lang/php apache2
```

Also make sure you have this in your apache config

vi /etc/conf.d/apache2

```
APACHE2_OPTS="-D PHP5"
```

----------

