Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apache and server move problem

Status
Not open for further replies.

kathanon

Technical User
Jan 29, 2002
218
GB
Hi All

We have recently moved our site from a shared server to a dedicated server. Now certain things do not work properly anymore.

The site in general is fine and uses a lot of php and a database. All of that is working so I don't think it is the php or MySQL

What does not work anymore are a few scripts. One is a php script called from within another page which outputs data in excel using vnd.ms-excel. This works with exactly the same script on the old server, so I am thinking it must be a configuration problem on the new server, or a problem with paths. The error the same script now gives is "error 404 object not found"

The settings on the old server were

Path to webspace: /home/ourdomain/public_html

New server is var/

I have checked that the mime types include vnd.ms-excel and tried lots of searches online and documentation but to no avail.

I have put the config below. Sorry to add so much info but I am at my wit's end

#
# Based upon the NCSA server configuration files originally by Rob McCool.
#
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL: for detailed information about
# the directives.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
#
# The configuration directives are grouped into three basic sections:
# 1. Directives that control the operation of the Apache server process as a
# whole (the 'global environment').
# 2. Directives that define the parameters of the 'main' or 'default' server,
# which responds to requests that aren't handled by a virtual host.
# These directives also provide default values for the settings
# of all virtual hosts.
# 3. Settings for virtual hosts, which allow Web requests to be sent to
# different IP addresses or hostnames and have them handled by the
# same Apache server process.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path. If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
# with ServerRoot set to "/etc/httpd" will be interpreted by the
# server as "/etc/httpd/logs/foo.log".
#

### Section 1: Global Environment
#
# The directives in this section affect the overall operation of Apache,
# such as the number of concurrent requests it can handle or where it
# can find its configuration files.
#

#
# Don't give away too much information about all the subcomponents
# we are running. Comment out this line if you don't mind remote sites
# finding out what major optional modules you are running
ServerTokens OS

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# NOTE! If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the LockFile documentation
# (available at <URL:# you will save yourself a lot of trouble.
#
# Do NOT add a slash at the end of the directory path.
#
ServerRoot "/etc/httpd"

#
# ScoreBoardFile: File used to store internal server process information.
# If unspecified (the default), the scoreboard will be stored in an
# anonymous shared memory segment, and will be unavailable to third-party
# applications.
# If specified, ensure that no two invocations of Apache share the same
# scoreboard file. The scoreboard file MUST BE STORED ON A LOCAL DISK.
#
#ScoreBoardFile run/httpd.scoreboard

#
# PidFile: The file in which the server should record its process
# identification number when it starts.
#
PidFile run/httpd.pid

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive Off

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 15

##
## Server-Pool Size Regulation (MPM specific)
##

# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
MaxClients 150
MaxRequestsPerChild 1000
</IfModule>

# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule worker.c>
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>

# perchild MPM
# NumServers: constant number of server processes
# StartThreads: initial number of worker threads in each server process
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# MaxThreadsPerChild: maximum number of worker threads in each server process
# MaxRequestsPerChild: maximum number of connections per server process
<IfModule perchild.c>
NumServers 5
StartThreads 5
MinSpareThreads 5
MaxSpareThreads 10
MaxThreadsPerChild 20
MaxRequestsPerChild 0
</IfModule>

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80
Listen 80

#
# Load config files from the config directory "/etc/httpd/conf.d".
#
Include conf.d/*.conf

#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#
LoadModule access_module modules/mod_access.so
LoadModule auth_module modules/mod_auth.so
LoadModule auth_anon_module modules/mod_auth_anon.so
LoadModule auth_dbm_module modules/mod_auth_dbm.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule env_module modules/mod_env.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule unique_id_module modules/mod_unique_id.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule asis_module modules/mod_asis.so
LoadModule info_module modules/mod_info.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule imap_module modules/mod_imap.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so

#
# ExtendedStatus controls whether Apache will generate "full" status
# information (ExtendedStatus On) or just basic information (ExtendedStatus
# Off) when the "server-status" handler is called. The default is Off.
#
#ExtendedStatus On

### Section 2: 'Main' server configuration
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition. These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
#
# All of these directives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#

#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# . On SCO (ODT 3) use "User nouser" and "Group nogroup".
# . On HPUX you may not be able to use shared memory as nobody, and the
# suggested workaround is to create a user use that user.
# NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
# when the value of (unsigned)Group is above 60000;
# don't use Group #-1 on these systems!
#
User apache
Group apache

#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed. This address appears on some server-generated pages, such
# as error documents. e.g. admin@your-domain.com
#
ServerAdmin admin@ourdomain.com

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If this is not set to valid DNS name for your host, server-generated
# redirections will not work. See also the UseCanonicalName directive.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address anyway, and this will make
# redirections work in a sensible way.
#
ServerName
#
# UseCanonicalName: Determines how Apache constructs self-referencing
# URLs and the SERVER_NAME and SERVER_PORT variables.
# When set "Off", Apache will use the Hostname and Port supplied
# by the client. When set "On", Apache will use the value of the
# ServerName directive.
#
UseCanonicalName On

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/var/
#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/var/
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI Multiviews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# # for more information.
#
Options Indexes FollowSymLinks

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All

#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all

</Directory>

#
# Disable autoindex for the root directory, and present a
# default Welcome page if no other index page is present.
#
<LocationMatch "^/+$">
Options -Indexes
ErrorDocument 403 /error/noindex.html
</LocationMatch>

#
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received.
#
# The path to the end user account 'public_html' directory must be
# accessible to the webserver userid. This usually means that ~userid
# must have permissions of 711, ~userid/public_html must have permissions
# of 755, and documents contained therein must be world-readable.
# Otherwise, the client will only receive a "403 Forbidden" message.
#
# See also: #
<IfModule mod_userdir.c>
#
# UserDir is disabled by default since it can confirm the presence
# of a username on the system (depending on home directory
# permissions).
#
UserDir disable

#
# To enable requests to /~user/ to serve the user's public_html
# directory, remove the "UserDir disable" line above, and uncomment
# the following line instead:
#
#UserDir public_html

</IfModule>

#
# Control access to UserDir directories. The following is an example
# for a site where these directories are restricted to read-only.
#
#<Directory /home/*/public_html>
# AllowOverride FileInfo AuthConfig Limit
# Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
# <Limit GET POST OPTIONS>
# Order allow,deny
# Allow from all
# </Limit>
# <LimitExcept GET POST OPTIONS>
# Order deny,allow
# Deny from all
# </LimitExcept>
#</Directory>

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
# The index.html.var file (a type-map) is used to deliver content-
# negotiated documents. The MultiViews Option can be used for the
# same purpose, but it is much slower.
#
DirectoryIndex index.html index.html.var

#
# AccessFileName: The name of the file to look for in each directory
# for access control information. See also the AllowOverride directive.
#
AccessFileName .htaccess

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>

#
# TypesConfig describes where the mime.types file (or equivalent) is
# to be found.
#
TypesConfig /etc/mime.types

#
# DefaultType is the default MIME type the server will use for a document
# if it cannot otherwise determine one, such as from filename extensions.
# If your server contains mostly text or HTML documents, "text/plain" is
# a good value. If most of your content is binary, such as applications
# or images, you may want to use "application/octet-stream" instead to
# keep browsers from trying to display binary files as though they are
# text.
#
DefaultType application/octet-stream

#
# The mod_mime_magic module allows the server to use various hints from the
# contents of the file itself to determine its type. The MIMEMagicFile
# directive tells the module where the hint definitions are located.
#
<IfModule mod_mime_magic.c>
# MIMEMagicFile /usr/share/magic.mime
MIMEMagicFile conf/magic
</IfModule>

#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off

#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here. If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog logs/error_log

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn

#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

#
# The location and format of the access logfile (Common Logfile Format).
# If you do not define any access logfiles within a <VirtualHost>
# container, they will be logged here. Contrariwise, if you *do*
# define per-<VirtualHost> access logfiles, transactions will be
# logged therein and *not* in this file.
#
# CustomLog logs/access_log common
CustomLog logs/access_log combined

#
# If you would like to have agent and referer logfiles, uncomment the
# following directives.
#
#CustomLog logs/referer_log referer
#CustomLog logs/agent_log agent

#
# If you prefer a single logfile with access, agent, and referer information
# (Combined Logfile Format) you can use the following directive.
#
#CustomLog logs/access_log combined

#
# Optionally add a line containing the server version and virtual host
# name to server-generated pages (error documents, FTP directory listings,
# mod_status and mod_info output etc., but not CGI generated documents).
# Set to "EMail" to also include a mailto: link to the ServerAdmin.
# Set to one of: On | Off | EMail
#
ServerSignature On

#
# Aliases: Add here as many aliases as you need (with no limit). The format is
# Alias fakename realname
#
# Note that if you include a trailing / on fakename then the server will
# require it to be present in the URL. So "/icons" isn't aliased in this
# example, only "/icons/". If the fakename is slash-terminated, then the
# realname must also be slash terminated, and if the fakename omits the
# trailing slash, the realname must also omit it.
#
# We include the /icons/ alias for FancyIndexed directory listings. If you
# do not use FancyIndexing, you may comment this out.
#
Alias /icons/ "/var/
<Directory "/var/ Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>

#
# This should be changed to the ServerRoot/manual/. The alias provides
# the manual, even if you choose to move your DocumentRoot. You may comment
# this out if you do not care for the documentation.
#
Alias /manual "/var/
<Directory "/var/ Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>

<IfModule mod_dav_fs.c>
# Location of the WebDAV lock database.
DAVLockDB /var/lib/dav/lockdb
</IfModule>

#
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the client.
# The same rules about trailing "/" apply to ScriptAlias directives as to
# Alias.
#
ScriptAlias /cgi-bin/ "/var/
<IfModule mod_cgid.c>
#
# Additional to mod_cgid.c settings, mod_cgid has Scriptsock <path>
# for setting UNIX socket for communicating with cgid.
#
#Scriptsock logs/cgisock
</IfModule>

#
# "/var/ should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/var/ AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

#
# Redirect allows you to tell clients about documents which used to exist in
# your server's namespace, but do not anymore. This allows you to tell the
# clients where to look for the relocated document.
# Example:
# Redirect permanent /foo
#
# Directives controlling the display of server-generated directory listings.
#

#
# FancyIndexing is whether you want fancy directory indexing or standard.
# VersionSort is whether files containing version numbers should be
# compared in the natural way, so that `apache-1.3.9.tar' is placed before
# `apache-1.3.12.tar'.
#
IndexOptions FancyIndexing VersionSort NameWidth=*

#
# AddIcon* directives tell the server which icon to show for different
# files or filename extensions. These are only displayed for
# FancyIndexed directories.
#
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip

AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*

AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core

AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^

#
# DefaultIcon is which icon to show for files which do not have an icon
# explicitly set.
#
DefaultIcon /icons/unknown.gif

#
# AddDescription allows you to place a short description after a file in
# server-generated indexes. These are only displayed for FancyIndexed
# directories.
# Format: AddDescription "description" filename
#
#AddDescription "GZIP compressed document" .gz
#AddDescription "tar archive" .tar
#AddDescription "GZIP compressed tar archive" .tgz

#
# ReadmeName is the name of the README file the server will look for by
# default, and append to directory listings.
#
# HeaderName is the name of a file which should be prepended to
# directory indexes.
ReadmeName README.html
HeaderName HEADER.html

#
# IndexIgnore is a set of filenames which directory indexing should ignore
# and not include in the listing. Shell-style wildcarding is permitted.
#
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t

#
# AddEncoding allows you to have certain browsers (Mosaic/X 2.1+) uncompress
# information on the fly. Note: Not all browsers support this.
# Despite the name similarity, the following Add* directives have nothing
# to do with the FancyIndexing customization directives above.
#
AddEncoding x-compress Z
AddEncoding x-gzip gz tgz

#
# DefaultLanguage and AddLanguage allows you to specify the language of
# a document. You can then use content negotiation to give a browser a
# file in a language the user can understand.
#
# Specify a default language. This means that all data
# going out without a specific language tag (see below) will
# be marked with this one. You probably do NOT want to set
# this unless you are sure it is correct for all cases.
#
# * It is generally better to not mark a page as
# * being a certain language than marking it with the wrong
# * language!
#
# DefaultLanguage nl
#
# Note 1: The suffix does not have to be the same as the language
# keyword --- those with documents in Polish (whose net-standard
# language code is pl) may wish to use "AddLanguage pl .po" to
# avoid the ambiguity with the common suffix for perl scripts.
#
# Note 2: The example entries below illustrate that in some cases
# the two character 'Language' abbreviation is not identical to
# the two character 'Country' code for its country,
# E.g. 'Danmark/dk' versus 'Danish/da'.
#
# Note 3: In the case of 'ltz' we violate the RFC by using a three char
# specifier. There is 'work in progress' to fix this and get
# the reference data for rfc1766 cleaned up.
#
# Danish (da) - Dutch (nl) - English (en) - Estonian (et)
# French (fr) - German (de) - Greek-Modern (el)
# Italian (it) - Norwegian (no) - Norwegian Nynorsk (nn) - Korean (kr)
# Portugese (pt) - Luxembourgeois* (ltz)
# Spanish (es) - Swedish (sv) - Catalan (ca) - Czech(cz)
# Polish (pl) - Brazilian Portuguese (pt-br) - Japanese (ja)
# Russian (ru) - Croatian (hr)
#
AddLanguage da .dk
AddLanguage nl .nl
AddLanguage en .en
AddLanguage et .et
AddLanguage fr .fr
AddLanguage de .de
AddLanguage he .he
AddLanguage el .el
AddLanguage it .it
AddLanguage ja .ja
AddLanguage pl .po
AddLanguage kr .kr
AddLanguage pt .pt
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pt-br .pt-br
AddLanguage ltz .ltz
AddLanguage ca .ca
AddLanguage es .es
AddLanguage sv .se
AddLanguage cz .cz
AddLanguage ru .ru
AddLanguage tw .tw
AddLanguage zh-tw .tw
AddLanguage hr .hr

#
# LanguagePriority allows you to give precedence to some languages
# in case of a tie during content negotiation.
#
# Just list the languages in decreasing order of preference. We have
# more or less alphabetized them here. You probably want to change this.
#
LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ltz ca es sv tw

#
# ForceLanguagePriority allows you to serve a result page rather than
# MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback)
# [in case no accepted languages matched the available variants]
#
ForceLanguagePriority Prefer Fallback

#
# Specify a default charset for all pages sent out. This is
# always a good idea and opens the door for future internationalisation
# of your web site, should you ever want it. Specifying it as
# a default does little harm; as the standard dictates that a page
# is in iso-8859-1 (latin1) unless specified otherwise i.e. you
# are merely stating the obvious. There are also some security
# reasons in browsers, related to javascript and URL parsing
# which encourage you to always set a default char set.
#
AddDefaultCharset ISO-8859-1

#
# Commonly used filename extensions to character sets. You probably
# want to avoid clashes with the language extensions, unless you
# are good at carefully testing your setup after each change.
# See ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets for
# the official list of charset names and their respective RFCs
#
AddCharset ISO-8859-1 .iso8859-1 .latin1
AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen
AddCharset ISO-8859-3 .iso8859-3 .latin3
AddCharset ISO-8859-4 .iso8859-4 .latin4
AddCharset ISO-8859-5 .iso8859-5 .latin5 .cyr .iso-ru
AddCharset ISO-8859-6 .iso8859-6 .latin6 .arb
AddCharset ISO-8859-7 .iso8859-7 .latin7 .grk
AddCharset ISO-8859-8 .iso8859-8 .latin8 .heb
AddCharset ISO-8859-9 .iso8859-9 .latin9 .trk
AddCharset ISO-2022-JP .iso2022-jp .jis
AddCharset ISO-2022-KR .iso2022-kr .kis
AddCharset ISO-2022-CN .iso2022-cn .cis
AddCharset Big5 .Big5 .big5
# For russian, more than one charset is used (depends on client, mostly):
AddCharset WINDOWS-1251 .cp-1251 .win-1251
AddCharset CP866 .cp866
AddCharset KOI8-r .koi8-r .koi8-ru
AddCharset KOI8-ru .koi8-uk .ua
AddCharset ISO-10646-UCS-2 .ucs2
AddCharset ISO-10646-UCS-4 .ucs4
AddCharset UTF-8 .utf8

# The set below does not map to a specific (iso) standard
# but works on a fairly wide range of browsers. Note that
# capitalization actually matters (it should not, but it
# does for some browsers).
#
# See ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets
# for a list of sorts. But browsers support few.
#
AddCharset GB2312 .gb2312 .gb
AddCharset utf-7 .utf7
AddCharset utf-8 .utf8
AddCharset big5 .big5 .b5
AddCharset EUC-TW .euc-tw
AddCharset EUC-JP .euc-jp
AddCharset EUC-KR .euc-kr
AddCharset shift_jis .sjis

#
# AddType allows you to add to or override the MIME configuration
# file mime.types for specific file types.
#
AddType application/x-tar .tgz

#
# AddHandler allows you to map certain file extensions to "handlers":
# actions unrelated to filetype. These can be either built into the server
# or added with the Action directive (see below)
#
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#
#AddHandler cgi-script .cgi

#
# For files that include their own HTTP headers:
#
#AddHandler send-as-is asis

#
# For server-parsed imagemap files:
#
AddHandler imap-file map

#
# For type maps (negotiated resources):
# (This is enabled by default to allow the Apache "It Worked" page
# to be distributed in multiple languages.)
#
AddHandler type-map var

# Filters allow you to process content before it is sent to the client.
#
# To parse .shtml files for server-side includes (SSI):
# (You will also need to add "Includes" to the "Options" directive.)
#
AddOutputFilter INCLUDES .shtml

#
# Action lets you define media types that will execute a script whenever
# a matching file is called. This eliminates the need for repeated URL
# pathnames for oft-used CGI file processors.
# Format: Action media/type /cgi-script/location
# Format: Action handler-name /cgi-script/location
#

#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 #

#
# Putting this all together, we can Internationalize error responses.
#
# We use Alias to redirect any /error/HTTP_<error>.html.var response to
# our collection of by-error message multi-language collections. We use
# includes to substitute the appropriate text.
#
# You can modify the messages' appearance without changing any of the
# default HTTP_<error>.html.var files by adding the line;
#
# Alias /error/include/ "/your/include/path/"
#
# which allows you to create your own set of files by starting with the
# /var/ files and
# copying them to /your/include/path/, even on a per-VirtualHost basis.
#

Alias /error/ "/var/
<IfModule mod_negotiation.c>
<IfModule mod_include.c>
<Directory "/var/ AllowOverride None
Options IncludesNoExec
AddOutputFilter Includes html
AddHandler type-map var
Order allow,deny
Allow from all
LanguagePriority en es de fr
ForceLanguagePriority Prefer Fallback
</Directory>

ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
ErrorDocument 410 /error/HTTP_GONE.html.var
ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
ErrorDocument 415 /error/HTTP_SERVICE_UNAVAILABLE.html.var
ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var

</IfModule>
</IfModule>

#
# The following directives modify normal HTTP response behavior to
# handle known problems with browser implementations.
#
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0

#
# The following directive disables redirects on non-GET requests for
# a directory that does not include the trailing slash. This fixes a
# problem with Microsoft WebFolders which does not appropriately handle
# redirects for folders with DAV methods.
#
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully

#
# Allow server status reports, with the URL of # Change the ".your-domain.com" to match your domain to enable.
#
#<Location /server-status>
# SetHandler server-status
# Order deny,allow
# Deny from all
# Allow from .your-domain.com
#</Location>

#
# Allow remote server configuration reports, with the URL of
# (requires that mod_info.c be loaded).
# Change the ".your-domain.com" to match your domain to enable.
#
#<Location /server-info>
# SetHandler server-info
# Order deny,allow
# Deny from all
# Allow from .your-domain.com
#</Location>

#
# Proxy Server directives. Uncomment the following lines to
# enable the proxy server:
#
#<IfModule mod_proxy.c>
#ProxyRequests On
#
#<Proxy *>
# Order deny,allow
# Deny from all
# Allow from .your-domain.com
#</Proxy>

#
# Enable/disable the handling of HTTP/1.1 "Via:" headers.
# ("Full" adds the server version; "Block" removes all outgoing Via: headers)
# Set to one of: Off | On | Full | Block
#
#ProxyVia On

#
# To enable the cache as well, edit and uncomment the following lines:
# (no cacheing without CacheRoot)
#
#CacheRoot "/etc/httpd/proxy"
#CacheSize 5
#CacheGcInterval 4
#CacheMaxExpire 24
#CacheLastModifiedFactor 0.1
#CacheDefaultExpire 1
#NoCache a-domain.com another-domain.edu joes.garage-sale.com

#</IfModule>
# End of proxy directives.

### Section 3: Virtual Hosts
#
# VirtualHost: If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#
#NameVirtualHost *

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>
 
I really wish people would stop posting their *entire* config, including several hundred lines of comments.

A lot of normally helpful people, like myself, see a full posting of the config, and just keep going.

1) I don't want to wade through the whole thing, including comments, and
2) It implies you haven't even done enough analysis of the problem to isolate the issue to a pertinant section of the configuration.

I'm sure there's someone here who will assist you, but most participants on these forums are here to help people help themselves. If you just want someone to do it for you, you might try the yellow pages.

You also might try finding one of sleipnir214's posts and reading his link on "how to ask a good question".
 
Thank you for your post Eric, even though I understand your feelings, and was very hesitant to put all of the config in, I am, as I said a complete newbie at this and so do not know which parts to post and which not to. I do feel in light of the time I have put in trying to resolve this, that your comments are perhaps a little unfair.

I searched on this problem and read other's posts before posting my own, as well as trying all sorts of different configuration options, such as mime types, script scriptalias, various paths as well as going through a lot of inherited script over the last two weeks. Anyway, I am sorry that my post has annoyed you. I will try to post more courteously in future

Kathy
 
error 404 object not found"

it sounds to me that you have an error in the PHP script.. you are referencing a file or folder that it doesn't exists anymore.

<aside>
I agree with ericbrunson, that error sounds as a script error, you should see the script before see whether apache has a good config or not. You told that server was moved, did you see whether scripts need to be configured or modified in order to adjust them to the new server?
</aside>

Cheers.
 
Kathy,

Okay, I feel a little bad about berating you. You happened to be the third person to post an entire config to the forum. I shouldn't have taken it out on you.

I'll help you out a little here...

Your problem is probably not with any of the following lines:

Code:
#
# Based upon the NCSA server configuration files originally 
#
# This is the main Apache server configuration file.  It con
# configuration directives that give the server its instruct
# See <URL:[URL unfurl="true"]http://httpd.apache.org/docs-2.0/>[/URL] for detailed i
# the directives.
#
# Do NOT simply read the instructions in here without unders
# what they do.  They're here only as hints or reminders.  I
# consult the online docs. You have been warned.  
#
# The configuration directives are grouped into three basic 
#  1. Directives that control the operation of the Apache se
#     whole (the 'global environment').
#  2. Directives that define the parameters of the 'main' or
#     which responds to requests that aren't handled by a vi
#     These directives also provide default values for the s
#     of all virtual hosts.
#  3. Settings for virtual hosts, which allow Web requests t
#     different IP addresses or hostnames and have them hand
#     same Apache server process.
#
# Configuration and logfile names: If the filenames you spec
# of the server's control files begin with "/" (or "drive:/"
# server will use that explicit path.  If the filenames do *
# with "/", the value of ServerRoot is prepended -- so "logs
# with ServerRoot set to "/etc/httpd" will be interpreted by
# server as "/etc/httpd/logs/foo.log".
#
### Section 1: Global Environment
#
# The directives in this section affect the overall operatio
# such as the number of concurrent requests it can handle or
# can find its configuration files.
#
#
# Don't give away too much information about all the subcomp
# we are running.  Comment out this line if you don't mind r
# finding out what major optional modules you are running
#
# ServerRoot: The top of the directory tree under which the 
# configuration, error, and log files are kept.
#
# NOTE!  If you intend to place this on an NFS (or otherwise
# mounted filesystem then please read the LockFile documenta
# (available at <URL:[URL unfurl="true"]http://httpd.apache.org/docs-2.0/mod/co[/URL]
# you will save yourself a lot of trouble.
#
# Do NOT add a slash at the end of the directory path.
#
#
# ScoreBoardFile: File used to store internal server process
# If unspecified (the default), the scoreboard will be store
# anonymous shared memory segment, and will be unavailable t
# applications.
# If specified, ensure that no two invocations of Apache sha
# scoreboard file. The scoreboard file MUST BE STORED ON A L
#
#ScoreBoardFile run/httpd.scoreboard
#
# PidFile: The file in which the server should record its pr
# identification number when it starts.
#
#
# Timeout: The number of seconds before receives and sends t
#
#
# KeepAlive: Whether or not to allow persistent connections 
# one request per connection). Set to "Off" to deactivate.
#
#
# MaxKeepAliveRequests: The maximum number of requests to al
# during a persistent connection. Set to 0 to allow an unlim
# We recommend you leave this number high, for maximum perfo
#
#
# KeepAliveTimeout: Number of seconds to wait for the next r
# same client on the same connection.
#
##
## Server-Pool Size Regulation (MPM specific)
##
# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which 
# MaxSpareServers: maximum number of server processes which 
# MaxClients: maximum number of server processes allowed to 
# MaxRequestsPerChild: maximum number of requests a server p
# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connecti
# MinSpareThreads: minimum number of worker threads which ar
# MaxSpareThreads: maximum number of worker threads which ar
# ThreadsPerChild: constant number of worker threads in each
# MaxRequestsPerChild: maximum number of requests a server p
# perchild MPM
# NumServers: constant number of server processes
# StartThreads: initial number of worker threads in each ser
# MinSpareThreads: minimum number of worker threads which ar
# MaxSpareThreads: maximum number of worker threads which ar
# MaxThreadsPerChild: maximum number of worker threads in ea
# MaxRequestsPerChild: maximum number of connections per ser
#
# Listen: Allows you to bind Apache to specific IP addresses
# ports, in addition to the default. See also the <VirtualHo
# directive.
#
# Change this to Listen on specific IP addresses as shown be
# prevent Apache from glomming onto all bound IP addresses (
#
#Listen 12.34.56.78:80
#
# Load config files from the config directory "/etc/httpd/co
#
#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was 
# have to place corresponding `LoadModule' lines at this loc
# directives contained in it are actually available _before_
# Statically compiled modules (those listed by `httpd -l') d
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#
#
# ExtendedStatus controls whether Apache will generate "full
# information (ExtendedStatus On) or just basic information 
# Off) when the "server-status" handler is called. The defau
#
#ExtendedStatus On
### Section 2: 'Main' server configuration
#
# The directives in this section set up the values used by t
# server, which responds to any requests that aren't handled
# <VirtualHost> definition.  These values also provide defau
# any <VirtualHost> containers you may define later in the f
#
# All of these directives may appear inside <VirtualHost> co
# in which case these default settings will be overridden fo
# virtual host being defined.
#
#
# If you wish httpd to run as a different user or group, you
# httpd as root initially and it will switch.  
#
# User/Group: The name (or #number) of the user/group to run
#  . On SCO (ODT 3) use "User nouser" and "Group nogroup".
#  . On HPUX you may not be able to use shared memory as nob
#    suggested workaround is to create a user [URL unfurl="true"]www and[/URL] use th
#  NOTE that some kernels refuse to setgid(Group) or semctl(
#  when the value of (unsigned)Group is above 60000;
#  don't use Group #-1 on these systems!
#
#
# ServerAdmin: Your address, where problems with the server 
# e-mailed.  This address appears on some server-generated p
# as error documents.  e.g. admin@your-domain.com
#
#
# ServerName gives the name and port that the server uses to
# This can often be determined automatically, but we recomme
# it explicitly to prevent problems during startup.
#
# If this is not set to valid DNS name for your host, server
# redirections will not work.  See also the UseCanonicalName
#
# If your host doesn't have a registered DNS name, enter its
# You will have to access it by its address anyway, and this
# redirections work in a sensible way.
#
#
# UseCanonicalName: Determines how Apache constructs self-re
# URLs and the SERVER_NAME and SERVER_PORT variables.
# When set "Off", Apache will use the Hostname and Port supp
# by the client.  When set "On", Apache will use the value o
# ServerName directive.
#
#
# DocumentRoot: The directory out of which you will serve yo
# documents. By default, all requests are taken from this di
# symbolic links and aliases may be used to point to other l
#
#
# Each directory to which Apache has access can be configure
# to which services and features are allowed and/or disabled
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive
# features.  
#
#
# Note that from this point forward you must specifically al
# particular features to be enabled - so if something's not 
# you might expect, make sure that you have specifically ena
# below.
#
#
# This should be changed to whatever you set DocumentRoot to
#
#
# Possible values for the Options directive are "None", "All
# or any combination of:
#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch Exe
#
# Note that "MultiViews" must be named *explicitly* --- "Opt
# doesn't give it to you.
#
# The Options directive is both complicated and important.  
# [URL unfurl="true"]http://httpd.apache.org/docs-2.0/mod/core.html#opt...[/URL]
# for more information.
#
#
# AllowOverride controls what directives may be placed in .h
# It can be "All", "None", or any combination of the keyword
#   Options FileInfo AuthConfig Limit
#
#
# Controls who can get stuff from this server.
#
#
# Disable autoindex for the root directory, and present a
# default Welcome page if no other index page is present.
#
#
# UserDir: The name of the directory that is appended onto a
# directory if a ~user request is received.
#
# The path to the end user account 'public_html' directory m
# accessible to the webserver userid.  This usually means th
# must have permissions of 711, ~userid/public_html must hav
# of 755, and documents contained therein must be world-read
# Otherwise, the client will only receive a "403 Forbidden" 
#
# See also: [URL unfurl="true"]http://httpd.apache.org/docs/misc/FAQ.html#forbi[/URL]
#
    #
    # UserDir is disabled by default since it can confirm th
    # of a username on the system (depending on home directo
    # permissions).
    #
    #
    # To enable requests to /~user/ to serve the user's publ
    # directory, remove the "UserDir disable" line above, an
    # the following line instead:
    #
    #UserDir public_html
#
# Control access to UserDir directories.  The following is a
# for a site where these directories are restricted to read-
#
#<Directory /home/*/public_html>
#    AllowOverride FileInfo AuthConfig Limit
#    Options MultiViews Indexes SymLinksIfOwnerMatch Include
#    <Limit GET POST OPTIONS>
#        Order allow,deny
#        Allow from all
#    </Limit>
#    <LimitExcept GET POST OPTIONS>
#        Order deny,allow
#        Deny from all
#    </LimitExcept>
#</Directory>
#
# DirectoryIndex: sets the file that Apache will serve if a 
# is requested.
#
# The index.html.var file (a type-map) is used to deliver co
# negotiated documents.  The MultiViews Option can be used f
# same purpose, but it is much slower.
#
#
# AccessFileName: The name of the file to look for in each d
# for access control information.  See also the AllowOverrid
#
#
# The following lines prevent .htaccess and .htpasswd files 
# viewed by Web clients.
#
#
# TypesConfig describes where the mime.types file (or equiva
# to be found.
#
#
# DefaultType is the default MIME type the server will use f
# if it cannot otherwise determine one, such as from filenam
# If your server contains mostly text or HTML documents, "te
# a good value.  If most of your content is binary, such as 
# or images, you may want to use "application/octet-stream" 
# keep browsers from trying to display binary files as thoug
# text.
#
#
# The mod_mime_magic module allows the server to use various
# contents of the file itself to determine its type.  The MI
# directive tells the module where the hint definitions are 
#
#   MIMEMagicFile /usr/share/magic.mime
#
# HostnameLookups: Log the names of clients or just their IP
# e.g., [URL unfurl="true"]www.apache.org[/URL] (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the 
# had to knowingly turn this feature on, since enabling it m
# each client request will result in AT LEAST one lookup req
# nameserver.
#
#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <Virt
# container, error messages relating to that virtual host wi
# logged here.  If you *do* define an error logfile for a <V
# container, that host's errors will be logged there and not
#
#
# LogLevel: Control the number of messages logged to the err
# Possible values include: debug, info, notice, warn, error,
# alert, emerg.
#
#
# The following directives define some format nicknames for 
# a CustomLog directive (see below).
#
#
# The location and format of the access logfile (Common Logf
# If you do not define any access logfiles within a <Virtual
# container, they will be logged here.  Contrariwise, if you
# define per-<VirtualHost> access logfiles, transactions wil
# logged therein and *not* in this file.
#
# CustomLog logs/access_log common
#
# If you would like to have agent and referer logfiles, unco
# following directives.
#
#CustomLog logs/referer_log referer
#CustomLog logs/agent_log agent
#
# If you prefer a single logfile with access, agent, and ref
# (Combined Logfile Format) you can use the following direct
#
#CustomLog logs/access_log combined
#
# Optionally add a line containing the server version and vi
# name to server-generated pages (error documents, FTP direc
# mod_status and mod_info output etc., but not CGI generated
# Set to "EMail" to also include a mailto: link to the Serve
# Set to one of:  On | Off | EMail
#
#
# Aliases: Add here as many aliases as you need (with no lim
# Alias fakename realname
#
# Note that if you include a trailing / on fakename then the
# require it to be present in the URL.  So "/icons" isn't al
# example, only "/icons/".  If the fakename is slash-termina
# realname must also be slash terminated, and if the fakenam
# trailing slash, the realname must also omit it.
#
# We include the /icons/ alias for FancyIndexed directory li
# do not use FancyIndexing, you may comment this out.
#
#
# This should be changed to the ServerRoot/manual/.  The ali
# the manual, even if you choose to move your DocumentRoot. 
# this out if you do not care for the documentation.
#
    # Location of the WebDAV lock database.
#
# ScriptAlias: This controls which directories contain serve
# ScriptAliases are essentially the same as Aliases, except 
# documents in the realname directory are treated as applica
# run by the server when requested rather than as documents 
# The same rules about trailing "/" apply to ScriptAlias dir
# Alias.
#
#
# Additional to mod_cgid.c settings, mod_cgid has Scriptsock
# for setting UNIX socket for communicating with cgid.
#
#Scriptsock            logs/cgisock
#
# "/var/[URL unfurl="true"]www/cgi-bin"[/URL] should be changed to whatever your Scri
# CGI directory exists, if you have that configured.
#
#
# Redirect allows you to tell clients about documents which 
# your server's namespace, but do not anymore. This allows y
# clients where to look for the relocated document.
# Example:
# Redirect permanent /foo [URL unfurl="true"]http://www.example.com/bar[/URL]
#
# Directives controlling the display of server-generated dir
#
#
# FancyIndexing is whether you want fancy directory indexing
# VersionSort is whether files containing version numbers sh
# compared in the natural way, so that `apache-1.3.9.tar' is
# `apache-1.3.12.tar'.
#
#
# AddIcon* directives tell the server which icon to show for
# files or filename extensions.  These are only displayed fo
# FancyIndexed directories.
#
#
# DefaultIcon is which icon to show for files which do not h
# explicitly set.
#
#
# AddDescription allows you to place a short description aft
# server-generated indexes.  These are only displayed for Fa
# directories.
# Format: AddDescription "description" filename
#
#AddDescription "GZIP compressed document" .gz
#AddDescription "tar archive" .tar
#AddDescription "GZIP compressed tar archive" .tgz
#
# ReadmeName is the name of the README file the server will 
# default, and append to directory listings.
#
# HeaderName is the name of a file which should be prepended
# directory indexes.
#
# IndexIgnore is a set of filenames which directory indexing
# and not include in the listing.  Shell-style wildcarding i
#
#
# AddEncoding allows you to have certain browsers (Mosaic/X 
# information on the fly. Note: Not all browsers support thi
# Despite the name similarity, the following Add* directives
# to do with the FancyIndexing customization directives abov
#
#
# DefaultLanguage and AddLanguage allows you to specify the 
# a document. You can then use content negotiation to give a
# file in a language the user can understand.
#
# Specify a default language. This means that all data
# going out without a specific language tag (see below) will
# be marked with this one. You probably do NOT want to set
# this unless you are sure it is correct for all cases.
#
# * It is generally better to not mark a page as
# * being a certain language than marking it with the wrong
# * language!
#
# DefaultLanguage nl
#
# Note 1: The suffix does not have to be the same as the lan
# keyword --- those with documents in Polish (whose net-stan
# language code is pl) may wish to use "AddLanguage pl .po" 
# avoid the ambiguity with the common suffix for perl script
#
# Note 2: The example entries below illustrate that in some 
# the two character 'Language' abbreviation is not identical
# the two character 'Country' code for its country,
# E.g. 'Danmark/dk' versus 'Danish/da'.
#
# Note 3: In the case of 'ltz' we violate the RFC by using a
# specifier. There is 'work in progress' to fix this and get
# the reference data for rfc1766 cleaned up.
#
# Danish (da) - Dutch (nl) - English (en) - Estonian (et)
# French (fr) - German (de) - Greek-Modern (el)
# Italian (it) - Norwegian (no) - Norwegian Nynorsk (nn) - K
# Portugese (pt) - Luxembourgeois* (ltz)
# Spanish (es) - Swedish (sv) - Catalan (ca) - Czech(cz)
# Polish (pl) - Brazilian Portuguese (pt-br) - Japanese (ja)
# Russian (ru) - Croatian (hr)
#
#
# LanguagePriority allows you to give precedence to some lan
# in case of a tie during content negotiation.
#
# Just list the languages in decreasing order of preference.
# more or less alphabetized them here. You probably want to 
#
#
# ForceLanguagePriority allows you to serve a result page ra
# MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPT
# [in case no accepted languages matched the available varia
#
#
# Specify a default charset for all pages sent out. This is
# always a good idea and opens the door for future internati
# of your web site, should you ever want it. Specifying it a
# a default does little harm; as the standard dictates that 
# is in iso-8859-1 (latin1) unless specified otherwise i.e. 
# are merely stating the obvious. There are also some securi
# reasons in browsers, related to javascript and URL parsing
# which encourage you to always set a default char set.
#
#
# Commonly used filename extensions to character sets. You p
# want to avoid clashes with the language extensions, unless
# are good at carefully testing your setup after each change
# See ftp://ftp.isi.edu/in-notes/iana/assignments/charac... 
# the official list of charset names and their respective RF
#
# For russian, more than one charset is used (depends on cli
# The set below does not map to a specific (iso) standard
# but works on a fairly wide range of browsers. Note that
# capitalization actually matters (it should not, but it
# does for some browsers).
#
# See ftp://ftp.isi.edu/in-notes/iana/assignments/charac...
# for a list of sorts. But browsers support few.
#
#
# AddType allows you to add to or override the MIME configur
# file mime.types for specific file types.
#
#
# AddHandler allows you to map certain file extensions to "h
# actions unrelated to filetype. These can be either built i
# or added with the Action directive (see below)
#
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" dire
#
#AddHandler cgi-script .cgi
#
# For files that include their own HTTP headers:
#
#AddHandler send-as-is asis
#
# For server-parsed imagemap files:
#
#
# For type maps (negotiated resources):
# (This is enabled by default to allow the Apache "It Worked
#  to be distributed in multiple languages.)
#
# Filters allow you to process content before it is sent to 
#
# To parse .shtml files for server-side includes (SSI):
# (You will also need to add "Includes" to the "Options" dir
#
#
# Action lets you define media types that will execute a scr
# a matching file is called. This eliminates the need for re
# pathnames for oft-used CGI file processors.
# Format: Action media/type /cgi-script/location
# Format: Action handler-name /cgi-script/location
#
#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 [URL unfurl="true"]http://www.example.com/subscription_info.[/URL]
#
#
# Putting this all together, we can Internationalize error r
#
# We use Alias to redirect any /error/HTTP_<error>.html.var 
# our collection of by-error message multi-language collecti
# includes to substitute the appropriate text.
#
# You can modify the messages' appearance without changing a
# default HTTP_<error>.html.var files by adding the line;
#
#   Alias /error/include/ "/your/include/path/"
#
# which allows you to create your own set of files by starti
# /var/[URL unfurl="true"]www/error/include/[/URL] files and
# copying them to /your/include/path/, even on a per-Virtual
#
#
# The following directives modify normal HTTP response behav
# handle known problems with browser implementations.
#
#
# The following directive disables redirects on non-GET requ
# a directory that does not include the trailing slash.  Thi
# problem with Microsoft WebFolders which does not appropria
# redirects for folders with DAV methods.
#
#
# Allow server status reports, with the URL of [URL unfurl="true"]http://server[/URL]
# Change the ".your-domain.com" to match your domain to enab
#
#<Location /server-status>
#    SetHandler server-status
#    Order deny,allow
#    Deny from all
#    Allow from .your-domain.com
#</Location>
#
# Allow remote server configuration reports, with the URL of
#  [URL unfurl="true"]http://servername/server-info[/URL] (requires that mod_info.c b
# Change the ".your-domain.com" to match your domain to enab
#
#<Location /server-info>
#    SetHandler server-info
#    Order deny,allow
#    Deny from all
#    Allow from .your-domain.com
#</Location>
#
# Proxy Server directives. Uncomment the following lines to
# enable the proxy server:
#
#<IfModule mod_proxy.c>
#ProxyRequests On
#
#<Proxy *>
#    Order deny,allow
#    Deny from all
#    Allow from .your-domain.com
#</Proxy>
#
# Enable/disable the handling of HTTP/1.1 "Via:" headers.
# ("Full" adds the server version; "Block" removes all outgo
# Set to one of: Off | On | Full | Block
#
#ProxyVia On
#
# To enable the cache as well, edit and uncomment the follow
# (no cacheing without CacheRoot)
#
#CacheRoot "/etc/httpd/proxy"
#CacheSize 5
#CacheGcInterval 4
#CacheMaxExpire 24
#CacheLastModifiedFactor 0.1
#CacheDefaultExpire 1
#NoCache a-domain.com another-domain.edu joes.garage-sale.co
#</IfModule>
# End of proxy directives.
### Section 3: Virtual Hosts
#
# VirtualHost: If you want to maintain multiple domains/host
# machine you can setup VirtualHost containers for them. Mos
# use only name-based virtual hosts so the server doesn't ne
# IP addresses. This is indicated by the asterisks in the di
#
# Please see the documentation at
# <URL:[URL unfurl="true"]http://httpd.apache.org/docs-2.0/vhosts/>[/URL]
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your vi
# configuration.
#
# Use name-based virtual hosting.
#
#NameVirtualHost *
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost cont
# The first VirtualHost section is used for requests without
# server name.
#
#<VirtualHost *>
#    ServerAdmin webmaster@dummy-host.example.com
#    DocumentRoot /[URL unfurl="true"]www/docs/dummy-host.example.com[/URL]
#    ServerName dummy-host.example.com
#    ErrorLog logs/dummy-host.example.com-error_log
#    CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>

I'm being a little facetious, but the point is, there's a *lot* of that config tha you must know is probably not related to the problem.

That being said, I realize was mean to you and now I now feel morally obligated to help you fix your server. :)

Read Chacalinc's post, consider the error message and compare what you wrote as the path to your web content compared to the DocumentRoot in the config.

Helpful would be an example of a URL that you think should work and doesn't and the location of the script on the filesystem, that way we'd be able to see if the url you're typing actually maps to what the config and file layout is.
 
Chacalinc and Eric thank you.

Well I have spent the morning reading up on Apache and then about PHP configuration. I have managed to partially resolve another problem with the site by adding a line to the Apache config, - This related to errors about headers already being ouput by a particular page

The line I added was as follows

AddType application/x-httpd-php .php

I even managed, albeit with difficulty not to repost the whole configuration here, but it was hard Eric :), very hard


I think Chacalinc is right, the problem must surely lie in a combination of apache configuration and php script.

I have tested the path by adding a simple php script in the place of the file that produces the excel. The server can find that with no problem and execute an echo statement. So it is not the paths there

The basic format for the urls is as follows


This page contains a link as follows

<a href="csvout.php/metlink.xls?ID=<?php echo $row_obs['Sch_ID']; ?>

This should output the data as an downloadable excel spreadsheet. The file csvout.php exists in the same folder as the referring page. The data is in the database and is shown in html on the referring page, but the link gives a page not found error.

As I mentioned, this still works with exactly the same script on the old server.

Eric, when you mention the URL I was not sure if you meant the actual page, I would be happy for you to look at the actual links, however, this is an educational children's project and I would prefer not to post it on the open web. I could always email the url though, but would not want to presume, especially after my megaposting

Thank you again, at this rate I will soon have learnt enough to start answering other people's questions (I do look through the posts in another forum here, to see if I can help - have even once or twice) Before you know it I will be ousting the tipmaster of the week!
 
csvout.php/metlink.xls?

That looks suspect. Without a custom handler in Apache (a module that would intercept the request like perl mason, e.g.) that url would try to find a *directory* named cvsout.php.
 
Thank you,

I have looked on php info for apache on the old server, and have found the modules below listed, but nothing is loaded on the new. Maybe loading these is what I need to do

mod_php4, mod_setenvif, mod_so, mod_headers, mod_expires, mod_auth_db, mod_auth_anon, mod_auth, mod_access, mod_rewrite, mod_alias, mod_userdir, mod_actions, mod_imap, mod_asis, mod_cgi, mod_dir, mod_autoindex, mod_include, mod_info, mod_status, mod_negotiation, mod_mime, mod_log_referer, mod_log_agent, mod_log_config, mod_env, mod_vhost_alias, http_core

 
Thanks Eric,

The mod_php4 turned out to have been loaded anyway, but still no success, thank you for your help though. I will post if I manage to find a solution

Kathy
 
I did some testing and the strange structure of the URL:


does actually work with mod_php, something didn't know.

Without more info, like messages in the error log or something, we're kinda clutching at straws.

I know how frustrating this can be, I'm trying to get a JBoss installation duplicated on a second server and it's just irritating the hell out of me. We have one app that runs and one that doesn't and the log messages are *completely* useless.
 
Yes, very frustrating :(

This is a dedicated server, which is a luxury, but it seems difficult to troubleshoot because we only have limited access, and I am testing things by making small changes one at a time.

Adding the "AddType application/x-httpd-php .php" line solved some things, but adding php as a module didn't work because it was already loaded (even though it doesn't show in the config above)

However, I still think you were right about it being some module that needs to run it as a script. There is another post from someone who has the same (ish) problem with a 404 error, although he doesn't mention php.

Anyway I wish you luck with sorting out your second server. On top of all this we now have to reinstall the local network (Windows) server in two weeks time due to various problems.
 
Hi All

I just wanted to post the answer to the problem that I was having, I finally solved it by adding the following to the Apache config file

<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
AcceptPathInfo On
LimitRequestBody 5524288
</Files>

Now Apache allows the script to run, rather than looking for a directory.

Thanks for all the support and info on this.
Kathy
 
That's odd. I don't have *anything* like that in my config. Are you missing a default handler for php.

I'm actually curious, what led you down the path to finding out how to fix it. I'm far more interested in how someone found a difficult solution than the actual answer. Anyone can ask a question, but slogging through a tough problem and finding the solution through hardwork and insight is *so* much more rewarding.

Good job, Kathy.
 
HI Eric

I tried lots of things from symlinks to scriptaliasing the php directories, joined the apache.org mailing list and kept making small changes. I got the answer from the mailing list in the end.

Here is an article with a paragraph about pathinfo and apache 2.



I agree, it is so much more rewarding this way.

This kind of thing can get a bit addictive really, thinking about the problem for ages, and the elation when the answer is found!

Thank you for your support. Now all I have to sort out is the myriad of small problems to do with our server reinstall

Hope you got your JBoss installation done without problems

All the best

Kathy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top