apache - Centos 6 log errors, how to fix?

06
2014-04
  • Travis

    So for some reason all my images on my blog disappear, no idea why now, but the first time it happened I removed Varnish, and the images came back, everything worked fine. An hour later the images disappear. This time I reboot apache and change the documentroot instead of zpanel, which I removed already. I then restarted apache and the images came back.

    Well again, an hour later the images disappear! The images return a 403 forbidden or just forbidden when you visit them directly.

    I cleared my error log and when visiting the error log.

    [Sat Nov 09 08:44:40 2013] [crit] [client 108.162.246.216] (13)Permission denied: /var/www/travisingram.net/public_html/wp-content/uploads/2013/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
    

    Really starting to rage badly because nothing is working to fix it, and I can't find anybody else having my issue at ALL.

    Help would be EXTREMELY appreciated.

    My site: http://travisingram.net/

    I am running CentOs 6 with latest lamp setup.

  • Answers
  • Manolo Salsas

    Check the .htaccess file permissions:

    ls -la /var/www/travisingram.net/public_html/wp-content/uploads/2013
    

    Maybe, it doesn't have read permissions. Try:

    sudo chmod 0644 /var/www/travisingram.net/public_html/wp-content/uploads/2013/.htaccess
    

    And checkout.


  • Related Question

    generate specific apache httpd error codes for testing
  • regulatre

    I'm testing client software which responds differently depending on a webserver's response code.

    For the purposes of testing, I need to configure my Apache server to return specific error codes, such as 500, 403, and many others.

    I don't want to have to produce the condition for each error code, I just want to return the error code to the browser/client for testing.

    Hopefully the syntax is simple such as the case of a redirect:

    Redirect 303 /two http://example.com/other
    

    But in theory I would like something like this:

    Redirect 500 /test /test2
    

    Does anybody know how to do this?

    Thanks!


  • Related Answers
  • BloodPhilia

    Why not use a PHP-header to do this?

    <?php
    header("HTTP/1.0 404 Not Found");
    ?>
    

    Will simply return a 404 error.

    http://www.jonasjohn.de/snippets/php/headers.htm has a list of all available error headers.

    The reason you'd not be getting a page saying "404 - not found" would be that the server itself isn't sending one while the web browser knows it exists (After all, the server is replying with 404). The web browser WILL be receiving the correct error code and detect it though.