A several years ago I ran a public network out of my apartment.  I had
email, www, etc. etc.  It all worked fine.  Then one day a couple of
years ago we decided that we could not afford to pay for a public IP
address anymore, so we had it turned off.  I haven't touched apache
since then, but we still run that box as it's faster than all the others
and runs distcc well.  We had a picture page that I wrote back in 2005
and occassionally when we have company over we use it to show them
pictures that we've taken.  I went to the site in my web browser this
evening, and saw only PHP code printed on the background image.  I've
checked the usual suspects:

carter apache2 # cat /etc/conf.d/apache2 
# /etc/conf.d/apache2: config file for /etc/init.d/apache2

# When you install a module it is easy to activate or deactivate the
modules
# and other features of apache using the APACHE2_OPTS line. Every module
should
# install a configuration in /etc/apache2/modules.d. In that file will
be an
# <IfDefine NNN> where NNN is the option to enable that module.
# Here are the options available in the default configuration:
#   USERDIR   Enables /~username mapping to /home/username/public_html
#   INFO      Enables mod_info, a useful module for debugging
#   PROXY     Enables mod_proxy
#   DAV       Enables mod_dav
#   DAV_FS    Enables mod_dav_fs (you should enable this when you enable
DAV
#             unless you know what you are doing)
#   SSL       Enables SSL
#   SSL_DEFAULT_VHOST  Enables default vhost for SSL (you should enable
this
#                      when you enable SSL unless you know what you are
doing)
#   LDAP      Enables mod_ldap
#   AUTH_LDAP Enables authentication through mod_ldap
#   DEFAULT_VHOST Enables the default virtual host
in /var/www/localhost/htdocs
APACHE2_OPTS="-D DEFAULT_VHOST -D PHP5 -D MAILMAN -D USERDIR"

# Extended options for advanced uses of Apache ONLY
# You don't need to edit these unless you are doing crazy Apache stuff
# As not having them set correctly, or feeding in an incorrect
configuration
# via them will result in Apache failing to start
# YOU HAVE BEEN WARNED.

# ServerRoot setting
#SERVERROOT=/usr/lib/apache2

# Configuration file location
# - If this does NOT start with a '/', then it is treated relative to
# $SERVERROOT by Apache
#CONFIGFILE=/etc/apache2/httpd.conf

# Location to log startup errors to
# They are normally dumped to your terminal.
#STARTUPERRORLOG="/var/log/apache2/startuperror.log"

# Environment variables to keep
# All environment variables are cleared from apache
# Use this to preserve some of them
# NOTE!!! It's very important that this contains PATH
# Also, it will fail if the _value_ of any of these variables contains a
space
KEEPENV="PATH"

carter apache2 # cat error_log
[Tue Jan 11 03:15:22 2011] [notice] Apache/2.2.16 (Unix) configured --
resuming normal operations
[Wed Jan 12 03:00:12 2011] [notice] Graceful restart requested, doing
restart
[Wed Jan 12 03:00:13 2011] [notice] Apache/2.2.16 (Unix) configured --
resuming normal operations
[Thu Jan 13 19:24:28 2011] [error] [client 192.168.2.3] File does not
exist: /home/michael/public_html/camera/$filename, referer:
http://carter.espersunited.com/~michael/camera/
[Thu Jan 13 19:43:23 2011] [notice] caught SIGTERM, shutting down
[Thu Jan 13 19:43:26 2011] [notice] Apache/2.2.16 (Unix) configured --
resuming normal operations
[Thu Jan 13 19:43:44 2011] [error] [client 192.168.2.3] File does not
exist: /home/michael/public_html/camera/$filename, referer:
http://carter.espersunited.com/~michael/camera/
[Thu Jan 13 19:48:06 2011] [error] [client 192.168.2.3] File does not
exist: /home/michael/public_html/camera/$filename, referer:
http://carter.espersunited.com/~michael/camera/index.php
[Thu Jan 13 19:49:53 2011] [error] [client 192.168.2.3] File does not
exist: /home/michael/public_html/camera/$filename, referer:
http://carter.espersunited.com/~michael/camera/index.php
[Thu Jan 13 19:49:56 2011] [error] [client 192.168.2.3] File does not
exist: /home/michael/public_html/camera/$filename, referer:
http://carter.espersunited.com/~michael/camera/index.php
[Thu Jan 13 19:49:59 2011] [error] [client 192.168.2.3] File does not
exist: /home/michael/public_html/camera/$filename, referer:
http://carter.espersunited.com/~michael/camera/index.php
[Thu Jan 13 19:50:02 2011] [error] [client 192.168.2.3] File does not
exist: /home/michael/public_html/camera/$filename, referer:
http://carter.espersunited.com/~michael/camera/index.php

(that $filename reference would have resolved if PHP were executed AS
PHP instead of plain text)

carter apache2 # ls /home/michael/public_html/camera/
010105  031706  050706  070707  080905  100304  110804  121107  current
thumbnail.php
010506  032008  051610  070905  081710  100507  111108  121210
current.php        thumbnail.php~
011305  032907  060509  071006  090205  101004  112004  121809
directory.php.bak
011409  042608  061608  071405  091105  101405  112206  122404
index.php
020705  042810  063005  072005  092208  102304  112504  122405
oldindex.html
022807  050307  070405  080605  100206  110604  120205  123106  test.php


See?  There ARE files there.

What am I missing here?  I looked at 
http://www.gentoo.org/proj/en/apache/doc/troubleshooting.xml

and it said that the browser cache might be full, so I closed the
browser, deleted the cache directory files, and reopened the browser.  


Reply via email to