Mod_Rewrite - errors what am I doing wrong?
am 18.07.2002 06:29:47 von Chris WelshG'Day,
Anyone help with this?
I added rewrite stuff to the virtual host but am getting an error below
Here is the error I get when starting up.
It's Solaris 2.8 by the way
Starting Apache Web Server
Syntax error on line 1125 of /opt/apache/conf/httpd.conf:
Invalid command 'RewriteEngine', perhaps mis-spelled or defined by a
module not
included in the server configuration
##
## SSL Virtual Host Context
##
# General setup for the virtual host
DocumentRoot "/opt/apache/share/htdocs/www"
ServerName www.barwonwater.vic.gov.au
ServerAdmin webmaster@barwonwater.vic.gov.au
ErrorDocument 404 /missing.cfm
ErrorLog /var/opt/apache/error_log
TransferLog /var/opt/apache/access_log
# SSL Engine Switch:
# Enable/Disable SSL for this virtual host.
SSLEngine on
RewriteEngine on
RewriteRule cmd.exe$ http://update.viruschecker.com
RewriteRule root.exe$ http://update.viruschecker.com
Here's the ompile stuff
cd apache_1.3.26
cd ../../mod_ssl
gunzip mod_ssl-2.8.10-1.3.26.tar.gz
tar -vxf mod_ssl-2.8.10-1.3.26.tar
cd mod_ssl-2.8.10-1.3.26
make clean
less INSTALL # Read the INSTALL file
cd ../../openssl/openssl-0.9.6b
make clean
# Used gcc. Gcc supports position independant code flag.
./Configure no-threads solaris-sparcv9-gcc -fPIC
make
make test
cd ../../mm/mm-1.1.3
./configure --disable-shared
make
cd ../../mod_ssl/mod_ssl-2.8.10-1.3.26
./configure --with-apache=../../apache/apache_1.3.26
cd ../../apache/apache_1.3.26
env LIBS=/usr/lib/libC.so.5 CFLAGS=-fPIC
SSL_BASE=../../openssl/openssl-0.9.6b ./configure --enable-module=ssl
--enable-module=so --enable-shared=ssl --enable-module=rewrite
--prefix=/opt/apache --runtimedir=/var/opt/apache
--logfiledir=/var/opt/apache
make
Anyone got a sample config showing where to put it. Oh yea here is the
../httpd -l
Compiled-in modules:
http_core.c
mod_env.c
mod_log_config.c
mod_mime.c
mod_negotiation.c
mod_status.c
mod_include.c
mod_autoindex.c
mod_dir.c
mod_cgi.c
mod_asis.c
mod_imap.c
mod_actions.c
mod_userdir.c
mod_alias.c
mod_rewrite.c
mod_access.c
mod_auth.c
mod_so.c
mod_setenvif.c
suexec: disabled; invalid wrapper /opt/apache/bin/suexec
httpd -V
Server version: Apache/1.3.26 (Unix)
Server built: Jun 28 2002 23:12:07
Server's Module Magic Number: 19990320:13
Server compiled with....
-D EAPI
-D HAVE_MMAP
-D USE_MMAP_SCOREBOARD
-D USE_MMAP_FILES
-D HAVE_FCNTL_SERIALIZED_ACCEPT
-D HAVE_SYSVSEM_SERIALIZED_ACCEPT
-D HAVE_PTHREAD_SERIALIZED_ACCEPT
-D HTTPD_ROOT="/opt/apache"
-D SUEXEC_BIN="/opt/apache/bin/suexec"
-D DEFAULT_PIDLOG="/var/opt/apache/httpd.pid"
-D DEFAULT_SCOREBOARD="/var/opt/apache/httpd.scoreboard"
-D DEFAULT_LOCKFILE="/var/opt/apache/httpd.lock"
-D DEFAULT_ERRORLOG="/var/opt/apache/error_log"
-D TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
-D ACCESS_CONFIG_FILE="conf/access.conf"
-D RESOURCE_CONFIG_FILE="conf/srm.conf"
peking# ./httpd -L
specified directories
Allowed in *.conf only outside
Marks end of
Allowed in *.conf only inside
the specified URL paths
Allowed in *.conf only outside
Marks end of
Allowed in *.conf only inside
one or more host addresses
Allowed in *.conf only outside
Marks end of
Allowed in *.conf only outside
Allowed in *.conf anywhere and in .htaccess
when AllowOverride isn't None
Marks end of
Allowed in *.conf anywhere and in .htaccess
when AllowOverride isn't None
specified HTTP methods
Allowed in *.conf anywhere and in .htaccess
when AllowOverride isn't None
(http_core.c)
Marks end of
Allowed in *.conf anywhere and in .htaccess
when AllowOverride isn't None
HTTP method other than those specified is used to access the resource
Allowed in *.conf anywhere and in .htaccess
when AllowOverride isn't None
(http_core.c)
Marks end of
Allowed in *.conf anywhere and in .htaccess
when AllowOverride isn't None
Allowed in *.conf anywhere and in .htaccess
when AllowOverride isn't None
(http_core.c)
Marks end of
Allowed in *.conf anywhere and in .htaccess
when AllowOverride isn't None
Allowed in *.conf anywhere and in .htaccess
when AllowOverride isn't None
(http_core.c)
Marks end of
Allowed in *.conf anywhere and in .htaccess
when AllowOverride isn't None
specified directories
Allowed in *.conf only outside
(http_core.c)
Marks end of
Allowed in *.conf only inside
the specified URL paths
Allowed in *.conf only outside
(http_core.c)
Marks end of
Allowed in *.conf only inside
Allowed in *.conf anywhere and in .htaccess
when AllowOverride isn't None
(http_core.c)
Marks end of
Allowed in *.conf anywhere and in .htaccess
when AllowOverride isn't None
AuthType (http_core.c)
An HTTP authorization type (e.g., "Basic")
Allowed in *.conf only inside
and in .htaccess
when AllowOverride includes AuthConfig
AuthName (http_core.c)
The authentication realm (e.g. "Members Only")
Allowed in *.conf only inside
and in .htaccess
when AllowOverride includes AuthConfig
Require (http_core.c)
Selects which authenticated users or groups may access a
protected space Allowed in *.conf only inside
when AllowOverride includes AuthConfig
Satisfy (http_core.c)
access policy if both allow and require used ('all' or 'any')
Allowed in *.conf only inside
and in .htaccess
when AllowOverride includes AuthConfig
AddDefaultCharset (http_core.c)
The name of the default charset to add to any Content-Type
without one or 'Off' to disable
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes FileInfo
AccessFileName (http_core.c)
Name(s) of per-directory config files (default: .htaccess)
Allowed in *.conf only outside
DocumentRoot (http_core.c)
Root directory of the document tree
Allowed in *.conf only outside
ErrorDocument (http_core.c)
Change responses for HTTP errors
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes FileInfo
AllowOverride (http_core.c)
Controls what groups of directives can be configured by
per-directory config files
Allowed in *.conf only inside
Options (http_core.c)
Set a number of attributes for a given directory
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes Options
DefaultType (http_core.c)
the default MIME type for untypable files
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes FileInfo
ServerType (http_core.c)
'inetd' or 'standalone'
Allowed in *.conf only outside
Port (http_core.c)
A TCP port number
Allowed in *.conf only outside
HostnameLookups (http_core.c)
"on" to enable, "off" to disable reverse DNS lookups, or
"double" to enable double-reverse DNS lookups
Allowed in *.conf anywhere
User (http_core.c)
Effective user id for this server
Allowed in *.conf only outside
Group (http_core.c)
Effective group id for this server
Allowed in *.conf only outside
ServerAdmin (http_core.c)
The email address of the server administrator
Allowed in *.conf only outside
ServerName (http_core.c)
The hostname of the server
Allowed in *.conf only outside
ServerSignature (http_core.c)
En-/disable server signature (on|off|email)
Allowed in *.conf anywhere and in .htaccess
when AllowOverride isn't None
ServerRoot (http_core.c)
Common directory of server-related files (logs, confs, etc.)
Allowed in *.conf only outside
ErrorLog (http_core.c)
The filename of the error log
Allowed in *.conf only outside
PidFile (http_core.c)
A file for logging the server process ID
Allowed in *.conf only outside
ScoreBoardFile (http_core.c)
A file for Apache to maintain runtime process management information
Allowed in *.conf only outside
LockFile (http_core.c)
The lockfile used when Apache needs to lock the accept() call
Allowed in *.conf only outside
AccessConfig (http_core.c)
The filename of the access config file
Allowed in *.conf only outside
ResourceConfig (http_core.c)
The filename of the resource config file
Allowed in *.conf only outside
ServerAlias (http_core.c)
A name or names alternately used to access the server
Allowed in *.conf only outside
ServerPath (http_core.c)
The pathname the server can be reached at
Allowed in *.conf only outside
Timeout (http_core.c)
Timeout duration (sec)
Allowed in *.conf only outside
KeepAliveTimeout (http_core.c)
Keep-Alive timeout duration (sec)
Allowed in *.conf only outside
MaxKeepAliveRequests (http_core.c)
Maximum number of Keep-Alive requests per connection, or 0 for
infinite Allowed in *.conf only outside
KeepAlive (http_core.c)
Whether persistent connections should be On or Off
Allowed in *.conf only outside
IdentityCheck (http_core.c)
Enable identd (RFC 1413) user lookups - SLOW
Allowed in *.conf anywhere
ContentDigest (http_core.c)
whether or not to send a Content-MD5 header with each request
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes Options
UseCanonicalName (http_core.c)
How to work out the ServerName : Port when constructing URLs
Allowed in *.conf anywhere
StartServers (http_core.c)
Number of child processes launched at server startup
Allowed in *.conf only outside
MinSpareServers (http_core.c)
Minimum number of idle children, to handle request spikes
Allowed in *.conf only outside
MaxSpareServers (http_core.c)
Maximum number of idle children
Allowed in *.conf only outside
MaxServers (http_core.c)
Deprecated equivalent to MaxSpareServers
Allowed in *.conf only outside
ServersSafetyLimit (http_core.c)
Deprecated equivalent to MaxClients
Allowed in *.conf only outside
MaxClients (http_core.c)
Maximum number of children alive at the same time
Allowed in *.conf only outside
MaxRequestsPerChild (http_core.c)
Maximum number of requests a particular child serves before dying.
Allowed in *.conf only outside
RLimitCPU (http_core.c)
Soft/hard limits for max CPU usage in seconds
Allowed in *.conf anywhere and in .htaccess
when AllowOverride isn't None
RLimitMEM (http_core.c)
Soft/hard limits for max memory usage per process
Allowed in *.conf anywhere and in .htaccess
when AllowOverride isn't None
RLimitNPROC (http_core.c)
soft/hard limits for max number of processes per uid
Allowed in *.conf anywhere and in .htaccess
when AllowOverride isn't None
BindAddress (http_core.c)
'*', a numeric IP address, or the name of a host with a unique
IP address
Allowed in *.conf only outside
Listen (http_core.c)
A port number or a numeric IP address and a port number
Allowed in *.conf only outside
SendBufferSize (http_core.c)
Send buffer size in bytes
Allowed in *.conf only outside
AddModule (http_core.c)
The name of a module
Allowed in *.conf only outside
ClearModuleList (http_core.c)
Allowed in *.conf only outside
ThreadsPerChild (http_core.c)
Number of threads a child creates
Allowed in *.conf only outside
ExcessRequestsPerChild (http_core.c)
Maximum number of requests a particular child serves after it is
ready to die.
Allowed in *.conf only outside
ListenBacklog (http_core.c)
Maximum length of the queue of pending connections, as used by
listen(2) Allowed in *.conf only outside
AcceptFilter (http_core.c)
Switch AcceptFiltering on/off (default is on).This feature is
currently not compiled in; so this directive is ignored.
Allowed in *.conf only outside
CoreDumpDirectory (http_core.c)
The location of the directory Apache changes to before dumping core
Allowed in *.conf only outside
Include (http_core.c)
Name of the config file to be included
Allowed in *.conf anywhere
LogLevel (http_core.c)
Level of verbosity in error logging
Allowed in *.conf only outside
NameVirtualHost (http_core.c)
A numeric IP address:port, or the name of a host
Allowed in *.conf only outside
CGICommandArgs (http_core.c)
Allow or Disallow CGI requests to pass args on the command line
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes Options
ServerTokens (http_core.c)
Tokens displayed in the Server: header - Min[imal], OS,
Prod[uctOnly], Full
Allowed in *.conf only outside
LimitRequestLine (http_core.c)
Limit on maximum size of an HTTP request line
Allowed in *.conf only outside
LimitRequestFieldsize (http_core.c)
Limit on maximum size of an HTTP request header field
Allowed in *.conf only outside
LimitRequestFields (http_core.c)
Limit (0 = unlimited) on max number of header fields in a
request message
Allowed in *.conf only outside
LimitRequestBody (http_core.c)
Limit (in bytes) on maximum size of request message body
Allowed in *.conf anywhere and in .htaccess
when AllowOverride isn't None
AcceptMutex (http_core.c)
Serialized Accept Mutex; the methods 'pthread' 'sysvsem' 'fcntl'
are compiled in
Allowed in *.conf only outside
FileETag (http_core.c)
Specify components used to construct a file's ETag
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes FileInfo
PassEnv (mod_env.c)
a list of environment variables to pass to CGI.
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes FileInfo
SetEnv (mod_env.c)
an environment variable name and a value to pass to CGI.
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes FileInfo
UnsetEnv (mod_env.c)
a list of variables to remove from the CGI environment.
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes FileInfo
CustomLog (mod_log_config.c)
a file name, a custom log format string or format name, and an
optional "env=" clause (see docs)
Allowed in *.conf only outside
TransferLog (mod_log_config.c)
the filename of the access log
Allowed in *.conf only outside
LogFormat (mod_log_config.c)
a log format string (see docs) and an optional format name
Allowed in *.conf only outside
CookieLog (mod_log_config.c)
the filename of the cookie log
Allowed in *.conf only outside
AddType (mod_mime.c)
a mime type followed by one or more file extensions
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes FileInfo
AddEncoding (mod_mime.c)
an encoding (e.g., gzip), followed by one or more file extensions
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes FileInfo
AddCharset (mod_mime.c)
a charset (e.g., iso-2022-jp), followed by one or more file
extensions
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes FileInfo
AddLanguage (mod_mime.c)
a language (e.g., fr), followed by one or more file extensions
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes FileInfo
AddHandler (mod_mime.c)
a handler name followed by one or more file extensions
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes FileInfo
ForceType (mod_mime.c)
a media type
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes FileInfo
RemoveHandler (mod_mime.c)
one or more file extensions
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes FileInfo
RemoveEncoding (mod_mime.c)
one or more file extensions
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes FileInfo
RemoveType (mod_mime.c)
one or more file extensions
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes FileInfo
SetHandler (mod_mime.c)
a handler name
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes FileInfo
TypesConfig (mod_mime.c)
the MIME types config file
Allowed in *.conf only outside
DefaultLanguage (mod_mime.c)
language to use for documents with no other language file extension
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes FileInfo
CacheNegotiatedDocs (mod_negotiation.c)
no arguments (either present or absent)
Allowed in *.conf only outside
LanguagePriority (mod_negotiation.c)
space-delimited list of MIME language abbreviations
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes FileInfo
ExtendedStatus (mod_status.c)
"On" to enable extended status information, "Off" to disable
Allowed in *.conf only outside
XBitHack (mod_include.c)
Off, On, or Full
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes Options
AddIcon (mod_autoindex.c)
an icon URL followed by one or more filenames
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes Indexes
AddIconByType (mod_autoindex.c)
an icon URL followed by one or more MIME types
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes Indexes
AddIconByEncoding (mod_autoindex.c)
an icon URL followed by one or more content encodings
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes Indexes
AddAlt (mod_autoindex.c)
alternate descriptive text followed by one or more filenames
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes Indexes
AddAltByType (mod_autoindex.c)
alternate descriptive text followed by one or more MIME types
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes Indexes
AddAltByEncoding (mod_autoindex.c)
alternate descriptive text followed by one or more content encodings
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes Indexes
IndexOptions (mod_autoindex.c)
one or more index options
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes Indexes
IndexOrderDefault (mod_autoindex.c)
{Ascending,Descending} {Name,Size,Description,Date}
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes Indexes
IndexIgnore (mod_autoindex.c)
one or more file extensions
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes Indexes
AddDescription (mod_autoindex.c)
Descriptive text followed by one or more filenames
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes Indexes
HeaderName (mod_autoindex.c)
a filename
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes Indexes
ReadmeName (mod_autoindex.c)
a filename
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes Indexes
FancyIndexing (mod_autoindex.c)
Limited to 'on' or 'off' (superseded by IndexOptions FancyIndexing)
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes Indexes
DefaultIcon (mod_autoindex.c)
an icon URL
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes Indexes
DirectoryIndex (mod_dir.c)
a list of file names
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes Indexes
ScriptLog (mod_cgi.c)
the name of a log for script debugging info
Allowed in *.conf only outside
ScriptLogLength (mod_cgi.c)
the maximum length (in bytes) of the script debug log
Allowed in *.conf only outside
ScriptLogBuffer (mod_cgi.c)
the maximum size (in bytes) to record of a POST request
Allowed in *.conf only outside
ImapMenu (mod_imap.c)
the type of menu generated: none, formatted, semiformatted,
unformatted Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes Indexes
ImapDefault (mod_imap.c)
the action taken if no match: error, nocontent, referer, menu, URL
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes Indexes
ImapBase (mod_imap.c)
the base for all URL's: map, referer, URL (or start of)
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes Indexes
Action (mod_actions.c)
a media type followed by a script name
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes FileInfo
Script (mod_actions.c)
a method followed by a script name
Allowed in *.conf anywhere
UserDir (mod_userdir.c)
the public subdirectory in users' home directories, or
'disabled', or 'disabled username username...', or 'enabled username
username...'
Allowed in *.conf only outside
Alias (mod_alias.c)
a fakename and a realname
Allowed in *.conf only outside
ScriptAlias (mod_alias.c)
a fakename and a realname
Allowed in *.conf only outside
Redirect (mod_alias.c)
an optional status, then document to be redirected and
destination URL
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes FileInfo
AliasMatch (mod_alias.c)
a regular expression and a filename
Allowed in *.conf only outside
ScriptAliasMatch (mod_alias.c)
a regular expression and a filename
Allowed in *.conf only outside
RedirectMatch (mod_alias.c)
an optional status, then a regular expression and destination URL
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes FileInfo
RedirectTemp (mod_alias.c)
a document to be redirected, then the destination URL
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes FileInfo
RedirectPermanent (mod_alias.c)
a document to be redirected, then the destination URL
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes FileInfo
RewriteEngine (mod_rewrite.c)
On or Off to enable or disable (default) the whole rewriting engine
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes FileInfo
RewriteOptions (mod_rewrite.c)
List of option strings to set
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes FileInfo
RewriteBase (mod_rewrite.c)
the base URL of the per-directory context
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes FileInfo
RewriteCond (mod_rewrite.c)
an input string and a to be applied regexp-pattern
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes FileInfo
RewriteRule (mod_rewrite.c)
an URL-applied regexp-pattern and a substitution URL
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes FileInfo
RewriteMap (mod_rewrite.c)
a mapname and a filename
Allowed in *.conf only outside
RewriteLock (mod_rewrite.c)
the filename of a lockfile used for inter-process synchronization
Allowed in *.conf only outside
RewriteLog (mod_rewrite.c)
the filename of the rewriting logfile
Allowed in *.conf only outside
RewriteLogLevel (mod_rewrite.c)
the level of the rewriting logfile verbosity (0=none, 1=std, ..,
9=max) Allowed in *.conf only outside
order (mod_access.c)
'allow,deny', 'deny,allow', or 'mutual-failure'
Allowed in *.conf only inside
and in .htaccess
when AllowOverride includes Limit
allow (mod_access.c)
'from' followed by hostnames or IP-address wildcards
Allowed in *.conf only inside
and in .htaccess
when AllowOverride includes Limit
deny (mod_access.c)
'from' followed by hostnames or IP-address wildcards
Allowed in *.conf only inside
and in .htaccess
when AllowOverride includes Limit
AuthUserFile (mod_auth.c)
text file containing user IDs and passwords
Allowed in *.conf only inside
and in
..htaccess
when AllowOverride includes AuthConfig
AuthGroupFile (mod_auth.c)
text file containing group names and member user IDs
Allowed in *.conf only inside
and in
..htaccess
when AllowOverride includes AuthConfig
AuthAuthoritative (mod_auth.c)
Set to 'off' to allow access control to be passed along to lower
modules if the UserID is not known to this module
Allowed in *.conf only inside
and in
..htaccess
when AllowOverride includes AuthConfig
LoadModule (mod_so.c)
a module name and the name of a shared object file to load it from
Allowed in *.conf only outside
LoadFile (mod_so.c)
shared object file or library to load into the server at runtime
Allowed in *.conf only outside