← Back to team overview

sslug-teknik team mailing list archive

Apache og ASP

 

Hej


Jeg har været ved at installere et ASP modul til Apache, og har efter en

lang og besværlig, men tilsidst vellykket installation tilføjet følgende

til min access.conf

 ##ASP##PERL##APACHE##UNIX##WINNT##ASP##PERL##APACHE##NOT##IIS##ASP##
     ## INSERT INTO Apache *.conf file, probably access.conf

##ASP##PERL##APACHE##ACTIVE##SERVER##PAGES##SCRIPTING##FREE##PEACE##

     <Location /asp/>

     ###########################################################
     ## mandatory
     ###########################################################

     # Generic apache directives to make asp start ticking.
     SetHandler perl-script
     PerlHandler Apache::ASP

     # Global
     # ------
     # Must be some writeable directory.  Session and Application
     # state files will be stored in this directory, and
     # as this directory is pushed onto @INC, you will be
     # able to "use" and "require" files in this directory.
     # Included files may also be in this directory, please see
     # section on includes for more information.
     PerlSetVar Global /tmp

     ###########################################################
     ## optional flags
     ###########################################################

     # CookiePath
     # ----------
     # Url root that client responds to by sending the session cookie.
     # If your asp application falls under the server url "/ASP",
     # then you would set this variable to /ASP.  This then allows
     # you to run different applications on the same server, with
     # different user sessions for each application.
     #
     PerlSetVar CookiePath /

     # AllowSessionState
     # -----------------
     # Set to 0 for no session tracking, 1 by default
     # If Session tracking is turned off, performance improves,
     # but the $Session object is inaccessible.
     #
     PerlSetVar AllowSessionState 1

     # SessionTimeout
     # --------------
     # Session timeout in minutes (defaults to 20)
     #
     PerlSetVar SessionTimeout 20

     # Debug
     # -----
     # 1 for server log debugging, 2 for extra client html output
     # Use 1 for production debugging, use 2 for development.
     # Turn off if you are not debugging.
     #
     PerlSetVar Debug 2

     # BufferingOn
     # -----------
     # default 1, if true, buffers output through the response object.
     # $Response object will only send results to client browser if
     # a $Response->Flush() is called, or if the asp script ends.  Lots
of
     # output will need to be flushed incrementally.
     #
     # If false, 0, the output is immediately written to the client,
     # CGI style.
     #
     # I would only turn this off if you have a really robust site,
     # since error handling is poor, if your asp script errors
     # after sending only some text.
     #
     PerlSetVar BufferingOn 1

     # StatINC
     # -------
     # default 0, if true, reloads perl libraries that have changed
     # on disk automatically for ASP scripts.  If false, the www server
     # must be restarted for library changes to take effect.
     #
     # A known bug is that any functions that are exported, e.g. confess

     # Carp qw(confess), will not be refreshed by StatINC.  To refresh
     # these, you must restart the www server.
     #
     PerlSetVar StatINC 1

     # SessionSerialize
     # ----------------
     # default 0, if true, locks $Session for duration of script, which
     # serializes requests to the $Session object.  Only one script at
     # a time may run, per user $Session, with sessions allowed.
     #
     # Serialized requests to the session object is the Microsoft ASP
way,
     # but is dangerous in a production environment, where there is risk

     # of long-running or run-away processes.  If these things happen,
     # a session may be locked for an indefinate period of time.  A user

     # STOP button should safely quit the session however.
     #
     PerlSetVar SessionSerialize 0

     # SoftRedirect
     # ------------
     # default 0, if true, a $Response->Redirect() does not end the
     # script.  Normally, when a Redirect() is called, the script
     # is ended automatically.  SoftRedirect 1, is a standard
     # way of doing redirects, allowing for html output after the
     # redirect is specified.
     #
     PerlSetVar SoftRedirect 0

     # NoState
     # -------
     # default 0, if true, neither the $Application nor $Session objects

will
     # be created.  Use this for a performance increase.  Please note
that
     # this setting takes precedence over the AllowSessionState setting.

     #
     PerlSetVar NoState 0

     # StateDir
     # --------
     # default $Global/.state.  State files for ASP application go to
     # this directory.  Where the state files go is the most important
     # determinant in what makes a unique ASP application.  Different
     # configs pointing to the same StateDir are part of the same
     # ASP application.
     #
     # The default has not changed since implementing this config
directive.
     # The reason for this config option is to allow OS's with caching
     # file systems like Solaris to specify a state directory separatly
     # from the Global directory, which contains more permanent files.
     # This way one may point StateDir to /tmp/asp, and make one's ASP
     # application scream with speed.
     #
     PerlSetVar StateDir ./.state

     # StateManager
     # ------------
     # default 10, this number specifies the numbers of times per
SessionTimeout
     # that timed out sessions are garbage collected.  The bigger the
number,
     # the slower your system, but the more precise Session_OnEnd's will

be
     # run from global.asa, which occur when a timed out session is
cleaned up,
     # and the better able to withstand Session guessing hacking
attempts.
     # The lower the number, the faster a normal system will run.
     #
     # The defaults of 20 minutes for SessionTimeout and 10 times for
     # StateManager, has dead Sessions being cleaned up every 2 minutes.

     #
     PerlSetVar StateManager 10

     # Filter
     # ------
     # default Off.  With filtering enabled, you can take advantage of
     # full server side includes (SSI), implemented through Apache::SSI.

     # SSI is implemented through this mechanism by using
Apache::Filter.
     # A sample configuration for full SSI with filtering is in the
     # eg/.htaccess file, with a relevant example script
eg/ssi_filter.ssi.
     #
     # You may only use this option with modperl v1.16 or greater
installed
     # and PERL_STACKED_HANDLERS enabled.  Filtering may be used in
     # conjunction with other handlers that are also "filter aware".
     #
     # With filtering through Apache::SSI, you should expect at least
     # a 20% performance decrease, increasing as your files get bigger,
     # increasing the work that SSI must do.
     PerlSetVar Filter On

     # PodComments
     # -----------
     # default 1.  With pod comments turned on, perl pod style comments
     # and documentation are parsed out of scripts at compile time.
     # This make for great documentation and a nice debugging tool,
     # and it lets you comment out perl code and html in blocks.
     # Specifically text like this:
     #
     # =pod
     # text or perl code here
     # =cut
     #
     # will get ripped out of the script before compiling.  The =pod and

     # =cut perl directives must be at the beginning of the line, and
must
     # be followed by the end of the line.
     PerlSetVar PodComments 1

     </Location>


##ASP##PERL##APACHE##UNIX##WINNT##ASP##PERL##APACHE##NOT##IIS##ASP##
     ## END INSERT

##ASP##PERL##APACHE##ACTIVE##SERVER##PAGES##SCRIPTING##!#MICROSOFT##

Når jeg så genstarter Apache med

/etc/rc.d/init.d/httpd start

kommer den med følgende


Starting httpd:
Syntax error on line 108 of /etc/httpd/conf/access.conf:
Invalid command 'PerlHandler', perhaps mis-spelled or defined by a
module not included in the server configuration
                                                           [FAILED]

Hvad skal man gøre ved det???

Jeg kan ikke finde noget i README filen om det.



Follow ups