[Solved] Apache doesn't seem to recognise ErrorDocument directive

I'm trying to put a custom 404 page on my server. I added this line to /etc/httpd/conf/httpd.conf
ErrorDocument 404 /not_found.html
not_found.html is found in /srv/http, which is my DocumentRoot.
I've tried restarting the server, putting not_found.html in the ServerRoot, and even in /. I also tried changing "/not_found.html" to "notfound.html" and "@@DocumentRoot@@/not_found.html" and "/srv/http/not_found.html". Apache still serves up in the default "Object not found!" page when you request something nonexistent.
The other peculiar thing, possibly a clue, is that it still puts server information (version, OS etc.) at the bottom of the page, despite me having turned ServerTokens and ServerSigniature off, which is supposed to supress this information. These directives have had the desired effect on "index" pages - the line is doesn't appear.
Could anyone suggest why I can't seem to change this behaviour at all? Perhaps there is somewhere I could find some detailed logs of httpd's behaviour? /etc/httpd/logs/error_log just logs the fact that a nonexistent page was requested, not what action it took.
Thanks.
Last edited by bjackman (2012-01-17 19:39:06)

lfitz wrote:
Try this:
in /etc/httpd/conf/httpd.conf search for <Directory />.
You'll find this:
<Directory />
AllowOverride None
</Directory>
change AllowOverride from 'None' to 'FileInfo' and put ErrorDocument 404 /not_found.html on the next line...
<Directory />
AllowOverride FileInfo
ErrorDocument 404 /not_found.html
</Directory>
I was able to replicate the problem on my server.  The comments above the default <Directory /> line, in httpd.conf, should explain why this happens.
Brilliant, exactly what I was looking for. Thanks very much.

Similar Messages

  • I can't get my new Macbook to allow me to sync and still keep my phones existing iTunes library. Even though it is the same account it doesn't seem to recognise that my Apple ID is the same

    I can't get my new Macbook to allow me to sync and still keep my phones existing iTunes library. Even though it is the same account it doesn't seem to recognise that my Apple ID is the same

    If youre like me, I have so many Apple devices, I always move things over manually rather than remember what to sync and what not to sync........ There’s an option to UNCHECK sync on any device if that helps you in ITUNES.
    On any device, like your phone, in ITUNES you can check the option for manual vs. automatically sync.

  • HT201250 I have had my mac stolen, I have an external HD I connect via USB for these time machine backups, I now have a new replacement mac and wish to restore from my external HD, migration assistant doesn't seem to recognise or see my drive ? please hel

    I have had my mac stolen, I have an external HD I connect via USB for these time machine backups, I now have a new replacement mac and wish to restore from my external HD, migration assistant doesn't seem to recognise or see my drive ? please help

    See Pondini's Excellent information here...
    Setting-up a new Mac from an old one, its backups, or a PC
    See the  Second Chance to Use Setup Assistant  here...
    http://Pondini.org/OSX/SetupLion.html

  • Hi I just bought the airport express, plugged it in and opened my airport utilities on my macbook and it doesn't seem to recognise  it anyone have an idea what I should do?

    hi I just bought the airport express, plugged it in and opened my airport utilities on my macbook and it doesn't seem to recognise  it anyone have an idea what I should do?

    If you are trying to configure the AirPort Express using wireless, you must first log on to the wireless signal that the Express is broadcasting to establish a connection.
    Look for a wireless network with a name like Apple Network xxxxxx where the "x" could be a number or letter. No password is required to log on.
    Most folks find it easier to temporarily connect using an Ethernet able as stic suggests in his post....if you have one handy. Once the device is configured, you can disconnect the Ethernet cable.

  • [solved] symlink doesn't seem to work

    Hi!
    I don't know where to fit this and I'm hopeless how to fix this!
    Every now and then I get these messages:
    Error loading the runtime (libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory)
    though I think it's all there:
    $ ls -l /usr/lib/libgtk-x11*
    lrwxrwxrwx 1 root root 27 11. Okt 16:13 /usr/lib/libgtk-x11-2.0.so -> libgtk-x11-2.0.so.0.2400.22
    lrwxrwxrwx 1 root root 27 11. Okt 16:13 /usr/lib/libgtk-x11-2.0.so.0 -> libgtk-x11-2.0.so.0.2400.22
    -rwxr-xr-x 1 root root 4391368 11. Okt 16:13 /usr/lib/libgtk-x11-2.0.so.0.2400.22
    "/usr/lib/libgtk-x11-2.0.so.0.2400.22" shows up green, so it's executable, I gather.
    What the hell is this? All pacman work seems to work fine, so I guess it's not something related to what I could find on the forums...
    Thanks for any help!
    chris
    Last edited by chris_blues (2013-11-03 11:31:48)

    I did it another way. I installed AIR via AUR/adobe-air-sdk and AUR/adobe-air
    It installed a whole bunch of 32-bit libraries, among others it removes gcc and replaces it with gcc-multilib. I hope thats not becoming an inconvenience in the future... I hope multilib means actually 32 AND 64 bit capabilities.
    That at least got Adobe AIR working. I shall see if this resolves the other problems as well. My guess is, that I was missing some 32bit-libs...
    marking as solved for now.
    Last edited by chris_blues (2013-11-03 11:20:34)

  • [Solved] IgnorePkg doesn't seem to work for me, what am I doing wrong?

    I'm trying to prevent "pacman -Syu" from installing the package "xf86-video-ati-6.12.192-1" onto my system and no matter what I try in "IgnorePkg" in pacman.conf it always installs this pkg. I've tried both "xf86-video-ati" and "xf86-video-ati-6.12.192-1" in the "IgnorePkg" but pacman always wants to install this package. If I delete it from /var/cache/pacman/pkg it will still download this pkg and install it.
    What is it that I'm doing wrong?
    Last edited by Gumper (2010-04-20 02:22:06)

    Gumper wrote:
    Doh! I feel so stupid. I just looked at my pacman.conf file once more and noticed the "#" in front of "IgnorePkg". I uncommented it and it works now.
    Thanks for the help!
    I recommend you to mark the thread as Solved, at least less people going to see how much lol you are.
    Last edited by n0dix (2010-04-19 03:27:48)

  • [SOLVED] DirectoryIndex doesn't seem to work :(

    Uh sorry, it's all fixed
    Last edited by Samzen (2008-09-09 07:03:40)

    I did it another way. I installed AIR via AUR/adobe-air-sdk and AUR/adobe-air
    It installed a whole bunch of 32-bit libraries, among others it removes gcc and replaces it with gcc-multilib. I hope thats not becoming an inconvenience in the future... I hope multilib means actually 32 AND 64 bit capabilities.
    That at least got Adobe AIR working. I shall see if this resolves the other problems as well. My guess is, that I was missing some 32bit-libs...
    marking as solved for now.
    Last edited by chris_blues (2013-11-03 11:20:34)

  • How do I export video from a Canon Optura 30 camcorder to my iMac/ iMovies? I've tried a Firewire cable but imovies doesn't seem to recognise the camcorder.

    I've been trying to export video from my Canon Optura 30 camcorder to imovies with a firewire lead, however nothing happens and imovies doesn't semm to reconise the camcorder. Can anyone help please?

    Here is a compatibility chart for iMovie:
    http://help.apple.com/imovie/cameras/en/index.html?lang=en_US
    I did not see yours; however, as long as it has firewire, it should work. Did you read the instructions in both your camcorder manual and in iMovie on the steps needed?
    If you can't get it to work after following the steps, what format does it record in? Is it on a memory card? If so, it'd be easy: just use a USB card reader, plug it in and import your footage that way.

  • I use a paticular website for ordering parts. It allows me to enter the parts I need, but when I go to the bottom of the page to click on "save and send" firefox doesn't seem to recognise that space.

    It's a private corporate site. Internet explorer has always worked just fine.

    None of the stuff in " http://kb.mozillazine.org/Locked_or_damaged_places.sqlite " helps. I have tried and tried and I have even wipe the computer clean still didn't help. I got the same problem as he/she has got in the first posted. Can add some web pages but not all the web pages I want.. I should have never updated to 3.6.13... That's when it all started for me, from that version..... Now Version 3.6.14 is out, I was hoping the version 3.6.14 might would fix the problem wrong again....
    Funny thing is i can not even Bookmark Firefox.com!!!!!...lol
    So any ideas on how to fix it other than the link giving would help.
    Thanks.

  • [solved] fancontrol - fan speed doesn't seem to change after boot

    I used fancontrol to control my fan but after I rebooted it doesn't seem to speed up the fan when it hits MAXTEMP whereas it did before I rebooted.
    Before the boot I set the CPU governer to performance (3.1Ghz) to heat up the cpu to test the fan cooling (using lm_sensors) and when it hit around 65c the fan got faster and cooled it adequately but after reboot the temp has gone right up to 90c and the fan doesn't even sound like it has sped up. 
    I have the AMD 8120fx 8 core CPU which is set to default/stock clocks in bios.
    cat /etc/fancontrol
    # Configuration file generated by pwmconfig, changes will be lost
    INTERVAL=10
    DEVPATH=hwmon2=devices/platform/nct6775.656
    DEVNAME=hwmon2=nct6776
    FCTEMPS=hwmon2/pwm2=hwmon2/temp9_input
    FCFANS=hwmon2/pwm2=hwmon2/fan2_input
    MINTEMP=hwmon2/pwm2=20
    MAXTEMP=hwmon2/pwm2=65
    MINSTART=hwmon2/pwm2=150
    MINSTOP=hwmon2/pwm2=0
    sudo systemctl status fancontrol -l
    fancontrol.service - Start fan control, if configured
    Loaded: loaded (/usr/lib/systemd/system/fancontrol.service; enabled)
    Active: active (running) since Tue 2014-03-04 17:11:13 GMT; 17min ago
    Main PID: 31561 (fancontrol)
    CGroup: /system.slice/fancontrol.service
    |- 8347 sleep 10
    `-31561 /bin/bash /usr/sbin/fancontrol
    Mar 04 17:11:13 myhost fancontrol[31561]: Depends on hwmon2/temp9_input
    Mar 04 17:11:13 myhost fancontrol[31561]: Controls hwmon2/fan2_input
    Mar 04 17:11:13 myhost fancontrol[31561]: MINTEMP=20
    Mar 04 17:11:13 myhost fancontrol[31561]: MAXTEMP=65
    Mar 04 17:11:13 myhost fancontrol[31561]: MINSTART=150
    Mar 04 17:11:13 myhost fancontrol[31561]: MINSTOP=0
    Mar 04 17:11:13 myhost fancontrol[31561]: MINPWM=0
    Mar 04 17:11:13 myhost fancontrol[31561]: MAXPWM=255
    Mar 04 17:11:13 myhost fancontrol[31561]: Enabling PWM on fans...
    Mar 04 17:11:13 myhost fancontrol[31561]: Starting automatic fan control...
    Any help would be appreciated, thanks.
    Last edited by pluckypigeon (2014-03-05 12:01:00)

    Algernop wrote:Have you implemented this by through the lm_sensors.service? This has been known to introduce boot-to-boot inconsistencies.
    Thank you for your response. I did have the lm_sensors.service problem before but not when I had this problem (I solved that by adding the modules created by sensors_detect to a module-load.d file.)
    The problem (I think) came from trying to fix the boot-to-boot inconsistencies (caused by lm_sensors.service). What I did was blacklist my k10temp module and that stopped a device from being detected. Then, when I generated the configuration file it didn't add the device.
    Below is my new configuration file, where you can see the device(hwmon1) is now in it.
    # Configuration file generated by pwmconfig, changes will be lost
    INTERVAL=10
    DEVPATH=hwmon2=devices/platform/nct6775.656 hwmon1=devices/pci0000:00/0000:00:18.3
    DEVNAME=hwmon2=nct6776 hwmon1=k10temp
    FCTEMPS= hwmon2/pwm2=hwmon1/device/temp1_input
    FCFANS= hwmon2/pwm2=hwmon2/fan2_input
    MINTEMP= hwmon2/pwm2=20
    MAXTEMP= hwmon2/pwm2=65
    MINSTART= hwmon2/pwm2=150
    MINSTOP= hwmon2/pwm2=0

  • My Apple TV 3 doesn't seem to connect to iTunes after I recognised it was in 'Recovery Mode'

    The status light was flashing quickly and I recognised it was in 'Recovery Mode'  My laptop doesn't even seem to recognise it - any help (iTunes - 12.0.1.26) (Apple TV 3 - 7.0 [I Think])

    The problem has been fixed, my MicroUSB had a faulty terminal thanks for trying to help though

  • LR5 's Adjustment Brush doesn't seem to work-does the New Radial Filter have priority?

    So why in the world would I update Lightroom in the middle of a job.?
    Before I was able to do in and touch up shadowy areas using (K) adjustment brush, but now it doesn;t seem to work. The radial brush does a good job for a defined area but for SPOT touching I have always used the the adjustment brush?
    Is there a setting or am I missing something or is this a bug?

    The presence of the Radial Filter in the tool set should have no effect on the Brush. It continues to work just as it always has. In fact, even if the RF is open (I sometimes hit it by mistake when I really want the Brush) and you click on the Brush icon, the RF closes and the Brush opens. If your Brush is not functioning properly, it is very unlikely that the RF is the reason. The usual first aid for any LR misbehavior is to close LR, remove the Preferences file from its folder and relaunch LR, allowing it to make a new preferences file. Not guaranteed to solve the problem, but worth trying.

  • Saving tabs doesn't seem to work anymore for me in 4.0.1

    Since I've installed FireFox 4.0.1 the saving of tabs doesn't seem to work anymore. When I press exit I only receive the notification "are you sure you want to close x tabs?". When firefox or my computer crashes the tabs are saved, but when I try to exit myself I can't. Can someone tell me how to solve this?

    Hi, I have a similar problem. When playing music, the screensaver has stopped working. Instead all I get is a white screen. I have checked all the settings and they are ok. The photos show and the albums show will work. But as soon as I switch back to slideshow I get the white screen back. It is even like this in 'Preview'.
    Have you solved the problem now. If so, how?
    Anyone else affected? I took a new software update to the Apple TV two days ago. Could this be the problem?
    all advice welcome
    regards
    Michael

  • My iPhone 5 randomly shutdown and rebooting doesn't seem to work for me, what should I do?

    It also happens when I'm charging my phone, and also the battery percentage doesn't show that correct battery level not unless I turn off and on.. I tried rebooting the phone but it doesn't seem to work for me, random shutdown still happens..

    Will not turn on, will not turn on unless connected to power, or unexpected power off
    Verify that the Sleep/Wake button functions. If it does not function, inspect it for signs of damage. If the button is damaged or is not functioning when pressed, seek service.
    Check if a Liquid Contact Indicator (LCI) is activated or there are signs of corrosion. Learn about LCIsand corrosion.
    Connect the iPhone to the iPhone's USB power adapter and let it charge for at least ten minutes.
    After at least 30 minutes, if:
    The home screen appears: The iPhone should be working. Update to the latest version of iOS if necessary. Continue charging it until it is completely charged and you see this battery icon in the upper-right corner of the screen . Then unplug the phone from power. If it immediately turns off, seek service.
    The low-battery image appears, even after the phone has charged for at least 20 minutes: See "iPhone displays the low-battery image and is unresponsive" symptom in this article.
    Something other than the Home screen or Low Battery image appears, continue with this article for further troubleshooting steps.
    If the iPhone did not turn on, reset it while connected to the iPhone USB power adapter.
    If the display turns on, go to step 4.
    If the display remains black, go to next step.
    Connect the iPhone to a computer and open iTunes. If iTunes recognizes the iPhone and indicates that it is in recovery mode, attempt to restore the iPhone. If the iPhone doesn't appear in iTunes or if you have difficulties in restoring the iPhone, see this article for further assistance.
    If restoring the iPhone resolved the issue, go to step 4. If restoring the iPhone did not solve the issue, seek service.

  • Dnscmd's OpenAcl option doesn't seem to change DNS record permissions

    I'm creating DNS A records with dnscmd /recordadd, and I can't see a difference in the A record's permissions whether I use the OpenAcl option or not. Is this normal?
    I was expecting with OpenAcl to see permissions similar to Write permissions for Authenticated Users or something. Instead I can't see any difference in the permissions at all and the permissions for non-admins are Read permissions for Everyone.
    The DCs run win 2008 R2 SP1. The syntax I've been using for dnscmd.exe is:
    dnscmd /recordadd mydomain.com mycomputer /aging /openacl A 192.168.0.123
    I want to migrate from Infoblox DNS to AD-integrated. So I'm expecting to export to csv from Infoblox, reformat the csv file a bit and use dnscmd.exe to read the reformatted csv and create DNS records in AD. I'll also enable the option on the Windows computers
    to register their DNS records.
    I think that the records that dnscmd.exe creates in AD won't have permissions that allow the Windows computers to overwrite them unless I use the OpenAcl option. But OpenAcl doesn't seem to make any difference to the permissions. Very confusing! Thanks for
    any help.

    Thanks Kumar and sorry for replying so late. What you said is correct and what solved my problem was running Windows Update. I was testing using W2K8 R2 with SP1 but no updates after that. After I ran Windows Update, then creating a DNS record using dnsmd.exe
    with the /OpenAcl argument did indeed set the permissions on the DNS record so that Authenticated Users could write to it.

Maybe you are looking for

  • Errors encounted during installation. (U44M1P7)

    Happens when I try to update: 06/18/13 14:11:38:326 | [INFO] |  | OOBE | DE |  |  |  | 10644 | *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* =*=*=*=*=*=*=*=* 06/18/13 14:11:38:326 | [INFO] |  | OOBE | DE |  |  |  | 10644 | Vis

  • Payment Posting - PC00_M99_PPM

    I am looking for help where PC00_M99_PPM Posting of payments (US PY)  is used in ALE distributed environment. i have used this program in same box and it works fine, i need to know if anyone has used this program where HR and FI are in diff boxes.

  • Kindly write some sample code for this scenario

    Kindly write some sample code for the below Logic. For a set of Deliveries entered on the selection screen get the relevant data from LIKP & LIPS. for all the deliveries selected get the sales order data from VBAK & VBAP based on the VGBEL & VGPOS in

  • ITunes share disconnects right after refreshing the contents of that share

    The device offering the sharing is a Thecus N4200Pro. It works fine in iTunes for Windows, but is not working with iTunes for Mac OS X. It disappears right after the playlist is displayed and shows up again. It has been tried on various configuration

  • Where is 9i Enterprise Edition for Windows 2000?

    Can anyone tell me where can I get 9i Enterprise Edition for Windows 2000? I only see the Sun's Solaris version. Can you run 9i AS in 8i 8.1.7?