The information and software
presented on this web site are
intended for educational use
only by OpenVMS application developers
and OpenVMS system attendants.Table of Contents


"You take the best computer people on the planet and let them collaborate in a world wide public forum (the internet) to produce a product that is better than any commercial variety"
According to this site: www.netcraft.com
65% of the web servers in the world are based upon Apache while only 15% are based upon products from Microsoft.
Although quite a bit of Apache documentation exists, info about CGI is lacking. On top of this, a few poorly documented quirks have been thrown into the OpenVMS extensions.
p.s. be careful when Googling the phrase "CGI". You might accidentally return information for www.cgi.com which happens to be the name of a computer services company headquartered in Montreal, Quebec, Canada.
$ set noon ! do not stop on errors
$ say :== write sys$output !
$ debug = f$trnlnm("NEIL$DEBUG","LNM$SYSTEM_TABLE")
$ if (debug .eqs. "Y") ! if CGI debugging is desired
$ then !
$ say "Status: 200" ! start of document header
$ say "Content-Type: text/html" ! mime type declaration
$ say "" ! end of document header
$ say "<html><head></head>" ! start of HTML
$ say "<body><pre>" !
$ endif
$! temps = "''WWW_REQUEST_METHOD'" ! purveyor method
$ temps = "''REQUEST_METHOD'" ! apache method
$ if (temps .eqs. "POST") .or. -
(temps .eqs. "GET") !
$ then !
$ run csmis$exe:read_html_apache.exe ! create DCL symbols (and sets $status to 1 if ok)
$ endif !
$ run csmis$exe:desired_application.exe ! this is our desired web application
$ if debug .eqs. "Y" !
$ then !
$ say "</pre> !
$ say "</body></html>" !
$ endif !
$ set noon ! do not stop on errors
$ say :== write sys$output !
$ debug = f$trnlnm("NEIL$DEBUG","LNM$SYSTEM_TABLE")
$ if (debug .eqs. "Y") ! if CGI debugging is desired
$ then !
$ say "Status: 200" ! start of document header
$ say "Content-Type: text/html" ! mime type declaration
$ say "" ! end of document header
$ say "<html><head></head>" ! start of HTML
$ say "<body><pre>" !
$ endif !
$ run csmis$exe:desired_application.exe ! this is our desired application
$ if debug .eqs. "Y" !
$ then !
$ say "</pre> !
$ say "</body></html>" !
$ endif !
or this:$ set noon ! do not stop on errors $ run csmis$exe:desired_application.exe ! this is our desired application (must return 1) $ rc = f$integer($STATUS) ! $ if ((rc .and. 7) .eq. 1) ! $ then ! $ say :== write sys$output ! $ say "Status: 500" ! start of document header $ say "Content-Type: text/html" ! mime type declaration $ say "" ! end of document header $ say "<html><head></head>" ! start of HTML $ say "<body><pre>" ! $ say "Script: 2001" ! $ say "error: ",rc ! $ say "</pre></body></html>" ! $ endif !or this:
$ run csmis$exe:desired_application.exe ! note: "csmis$exe" is a directory on my platformBut your ultimate goal is to run the binary application directly from a specially configured Apache directory. This can be done my enabling one, or more, directories to run executables. In the NCSA web server, some directories were enabled to run applications by default. In Apache the default settings for scripting and running applications are disabled for security reasons. You turn them on my creating/modifying <Directory> declarations in a file named APACHE$COMMON:[000000.CONF]HTTPD.CONF
If you're familiar with writing CGI's for either Purveyor (Process Software Corporation) or OSU DECthreads then you'll probably recognize the "show symbol" and "show logical" lines in the following CGI script.
$ set noon ! do not stop on errors
$ say :== write sys$output !
$ say "Status: 200" ! start of document header
$ say "Content-Type: text/html" !
$ say "" ! end of document header
$ say "<html><head></head>" ! start of HTML
$ say "<body><pre>" !
$ show symbol /local/all ! show web-server process-level local symbols
$ show symbol /global/all ! show web-server process-level global symbols
$ show logical/proc/job ! show web-server job-level logical names
$! temps = "''WWW_REQUEST_METHOD'" x purveyor method
$ temps = "''REQUEST_METHOD'" ! apache method
$ if (temps .eqs. "POST") .or. -
(temps .eqs. "GET")
$ then
$ run csmis$exe:read_html_apache.exe ! create DCL symbols (and sets $status to 1 if ok)
$ endif
$ show symbol /local/all ! show all process-level local symbols
$ show symbol /global/all ! show all process-level global symbols
$ show logical/proc/job ! show all job-level logical names
$ say "</pre></body></html>" ! end of HTML
The program just listed will not work properly with SWS because the interface has been locked down to limit hacking. This means that "$show symbol /all" statement won't display any environment variables passed to the CGI by the server. (but you will see FORM variables which were created by your application). To view server-created variables you must explicitly request them by name like this:
$ show symbol/local SYMBOL-NAME $ show symbol/global SYMBOL-NAME
... which means you need to know their names ahead of time. Inspect the contents of script "TEST-CGI-VMS.COM" to see what I mean. Note that this incomplete file is missing environment variables AUTH_TYPE, HTTP_COOKIE, REMOTE_USER (and probably a few more).
Starting CSWS with "certain system-level logical names" will modify Apache's operation. Put these declarations in script sys$manager:SYSTARTUP_VMS.COM just before you invoke @sys$startup:APACHE$STARTUP.COM
This table was copied from Compaq's "V2.1-1 Installation and Configuration Guide" (more logicals were added with 2.2)
| Table 3-5 User Defined Logical Names | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| Logical Name | Description | ||||||||
|
APACHE$BG_PIPE_BUFFER_SIZE
(New in Version 2.0) |
System logical name that is used to set the socket pipe buffer size for exec functions. If this logical is not set, the default is 32767. | ||||||||
|
APACHE$CGI_BYPASS_OWNER_CHECK (Obsolete in V2.x) |
If defined to any value, this logical name causes the Secure Web Server to bypass the file owner check of the CGI script file. The default is to enforce the owner check on CGI script files for security purposes. | ||||||||
| APACHE$CGI_MODE |
System logical name that
controls how CGI environment variables are defined in the executing CGI
process. There are three different options. Note that only one option is
available at a time.
|
||||||||
| APACHE$CREATE_SYMBOLS_GLOBAL | If defined, this system logical name causes CGI environment symbols to be defined globally. They are defined locally by default. | ||||||||
|
APACHE$DAV_DBM_TYPE (New in Version 2.0) |
Used to define the desired DBM organization to use for MOD_DAV. The valid options for this logical are: GDBM, SDBM, VDBM. If this logical is not set, the default is VDBM. | ||||||||
| APACHE$DEBUG_DCL_CGI | If defined, this system logical name enables APACHE$VERIFY_DCL_CGI and APACHE$SHOW_CGI_SYMBOL. | ||||||||
|
APACHE$DL_CASE (New in Version 2.0) |
System logical name that
controls how Apache will locate shareable entry points. There are four
different options. Note that only one option is available at a time.
|
||||||||
|
APACHE$DL_FORCE_UPPERCASE
(Obsolete in Version 2.x) |
If defined to be true (1, T, or Y), this system logical name forces case-sensitive dynamic image activation symbol lookups. By default, symbol lookups are first done in a case-sensitive manner and then, if failed, a second attempt is made using case-insensitive symbol lookups. This fallback behavior can be disabled with APACHE$DL_NO_UPPERCASE_FALLBACK. | ||||||||
|
APACHE$DL_NO_UPPERCASE_FALLBACK (Obsolete in Version 2.x) |
If defined to be true (1, T, or Y), this system logical name disables case-insensitive symbol name lookups whenever case-sensitive lookups fail. See APACHE$DL_FORCE_UPPERCASE | ||||||||
|
APACHE$FIXBG (Obsolete in Version 2.x) |
System executive mode logical name pointing to installed, shareable images. Not intended to be modified by the user. Replaced by APACHE$SET_CCL.EXE | ||||||||
|
APACHE$FLIP_CCL (New in Version 2.0) |
Used by APACHE$SET_CCL.EXE, which replaces APACHE$FIXBG.EXE | ||||||||
| APACHE$INPUT | Used by CGI programs for PUT/POST methods of reading the input stream. | ||||||||
|
APACHE$MB_PIPE_BUFFER_SIZE
(New in Version 2.0) |
Used to set the mailbox pipe buffer size for exec functions. If this logical is not set, the default is 4096. | ||||||||
|
APACHE$PLV_ENABLE_<username>
(Obsolete in Version 2.x) |
System executive mode logical name defined during startup and used to control access to the services provided by the APACHE$PRIVILEGED image. Not intended to be modified by the user. | ||||||||
|
APACHE$PLV_LOGICAL (Obsolete in Version 2.x) |
System executive mode logical name defined during startup and used to control access to the services provided by the APACHE$PRIVILEGED image. Not intended to be modified by the user. | ||||||||
| APACHE$PREFIX_DCL_CGI_SYMBOLS_WWW | If defined, this system logical name prefixes all CGI environment variable symbols with "WWW_". By default, no prefix is used. | ||||||||
|
APACHE$PRIVILEGED (Obsolete in Version 2.x) |
System executive mode logical name pointing to installed, shareable images. Not intended to be modified by the user. | ||||||||
|
APACHE$READDIR_NO_DOT_FILES
(New in Version 2.0) |
Used to disable the simulating of dot files when processing directories. There is no default value. | ||||||||
|
APACHE$READDIR_NO_NULL_TYPE
(New in Version 2.0) |
Used to disable the elimination of the null type which contains a single dot when processing directories. There is no default value. | ||||||||
|
APACHE$READDIR_NO_UNIX_OPEN
(New in Version 2.0) |
Used to disable the processing of unix files when processing directories. There is no default value. | ||||||||
|
APACHE$SET_CCL (New in Version 2.0) |
Used by APACHE$SET_CCL.EXE, which replaces APACHE$FIXBG.EXE | ||||||||
| APACHE$SHOW_CGI_SYMBOL | If defined, this system logical name provides information for troubleshooting the CGI environment by dumping all of the symbols and logicals (job/process) for a given CGI. Use with APACHE$DEBUG_DCL_CGI. | ||||||||
|
APACHE$SSL_DBM_TYPE (New in Version 2.0) |
Used to define the desired DBM organization to use for MOD_SSL. The valid options for this logical are: GDBM, SDBM, VDBM. If this logical is not set, the default is VDBM. | ||||||||
|
APACHE$SPL_DISABLED (New in Version 2.0) |
Used to determine whether Shared Process Logging is to be disabled. There is no default value. | ||||||||
|
APACHE$SPL_MAX_BUFFERS (New in Version 2.0) |
Used to determine the maximum buffer quota for each Shared Process Logging mailbox. If this logical is not set, the default is 10. | ||||||||
|
APACHE$SPL_MAX_MESSAGE (New in Version 2.0) |
Used to determine the maximum message size for each Shared Process Logging mailbox. If this logical is not set, the default is 1024. | ||||||||
|
APACHE$SPL_FLUSH_INTERVAL
(New in Version 2.0) |
Used to determine the maximum message count per Shared Process Logging file before data is flushed to disk. If this logical is not set, the default is 256. | ||||||||
|
APACHE$USE_CUSTOM_STAT (New in Version 2.0) |
System logical name that is used to indicate that the custom apache stat function should be used rather than the run-time stat function. | ||||||||
|
APACHE$USER_HOME_PATH_UPPERCASE (Obsolete in Version 2.x) |
If defined to be true (1, T, or Y), this system logical name uppercases device and directory components for user home directories when matching pathnames in <DIRECTORY> containers. This provides backward compatibility for sites that specify these components in uppercase within <DIRECTORY> containers. See the UserDir directive in Modules and Directives section for more information. | ||||||||
| APACHE$VERIFY_DCL_CGI | If defined, this system logical name provides information for troubleshooting DCL command procedure CGIs by forcing a SET VERIFY before executing any DCL CGI. Use with APACHE$DEBUG_DCL_CGI. | ||||||||
I was recently working on an SWS application for my employer to do the following:
First off, I enabled these two lines in HTTPD.CONF
LoadModule auth_module modules/mod_auth.exe LoadModule auth_openvms_module modules/mod_auth_openvms.exe
...then restarted the server. Everything seemed to work as expected except that I couldn't get any USERNAME info to show up in the DCL script. Furthermore, the DCL version of CGI debugging script "TEST-CGI-VMS.COM" seems to be missing some environmental variables like REMOTE_USER. To make matters worse, the otherwise excellent book "OpenVMS with Apache, OSU, and WASD" states that variable HTTP_AUTHORIZATION should be available in all servers including SWS.
(I was looking for this environmental as a sign that the base64 encoded username and password were making it through to my CGI; I have since discovered that neither SWS nor "Apache on UNIX" ever passed HTTP_AUTHORIZATION to a CGI program).
According to some helpful folks at Compaq (now HP), in order to get authorization information like REMOTE_USER transferred to the CGI you must do the following:
ServerRoot "/apache$root"
DocumentRoot "/apache$common/main"
LoadModule auth_openvms_module /apache$common/modules/mod_auth_openvms.exe_alpha
ScriptAlias /cgi-bin/ "/apache$root/cgi-bin/"
ScriptAlias /scripts/ "/apache$root/scripts/"
ScriptAlias /bell_private_scripts/ "/apache$root/bell_private_scripts/"
ScriptAlias /ics_private_scripts/ "/apache$root/ics_private_scripts/"
Alias /bell_private/ "/apache$root/bell_private/"
<Directory "/apache$root/bell_private">
Options FollowSymLinks
AllowOverride All <-- enable .HTACCESS (this red remark should not be in your file)
Order allow,deny
Allow from all
</Directory>
Alias /ics_private/ "/apache$root/ics_private/"
<Directory "/apache$root/ics_private">
Options Indexes FollowSymLinks Multiviews
AllowOverride All <-- enable .HTACCESS (this red remark should not be in your file)
Order allow,deny
Allow from all
</Directory>
<Directory "/apache$root/bell_private_scripts">
AllowOverride AuthConfig <-- enable .HTACCESS (this red remark should not be in your file)
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
<Directory "/apache$root/ics_private_scripts">
AllowOverride AuthConfig <-- enable .HTACCESS (this red remark should not be in your file)
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
AuthType Basic AuthAuthoritative On AuthName "ICSIS Bell-ATS Authentication" AuthOpenVMSUser On AuthOpenVMSAuthoritative On require valid-user
# ScriptAlias /cgi-bin/ "/apache$documents/cgi-bin/" <-- enable scripting ScriptAlias /scripts/ "/apache$documents/scripts/" <-- enable scripting ScriptAlias /ics_private_scripts/ "/apache$documents/ics_private_scripts/" <-- enable scripting # <Directory "/apache$documents/cgi-bin"> AllowOverride None Options None Order allow,deny Allow from all </Directory> # <Directory "/apache$documents/scripts"> AllowOverride None Options None Order allow,deny Allow from all </Directory> # <Directory "/apache$documents/ics_private_scripts"> AllowOverride AuthConfig <-- enable authorization (this red remark should not be in your file) Options None Order allow,deny Allow from all </Directory> #
Most form data sent to Apache will be less than or equal to 32,767 bytes. But if you are supporting file-upload like so:
<form method="post" enctype="multipart/form-data" action="/scripts/upload_test_neil"> <input type="text" name="textline"> <input type="file" name="datafile"> <input type="submit" name="Send"> </form>...then you might experience uploads larger than 32,767 bytes. Okay so what's the big deal? Well, if your CGI program was written in "C" then it would be no big deal to read Apache symbol "CONTENT_LENGTH" then malloc that amount (if you have enough memory). Next, you would call fopen(fname,"rb") then read the whole amount all in one operation.
This is not possible if your CGI program was written in BASIC since that language limits strings to a maximum size of 32,767. This means you would need to do multiple reads until you have extracted CONTENT_LENGTH bytes.
Caveat: I am currently (2010-05-30) working on a better CGI program which will properly deal with form data larger than 32k and will post the solution soon. As always, it will be available free-of-charge. The solution will be written in HP BASIC for OpenVMS but I will also post some working stubs written in "C".
Telnet www.bellics.net 80 <<<--- type this then hit <enter> HEAD / HTTP/1.0 <<<--- type this then hit <enter> <<<--- hit <enter> (a blank line to end the MIME block) HTTP/1.1 200 OK <<<--- start of the HTML response header Date: Mon, 08 Jun 2009 20:17:47 GMT <<<--- server's current time stamp Server: Apache/2.0.52 (OpenVMS) mod_ssl/2.0.52 OpenSSL/0.9.7d <<<--- web server flavor and version; ssl version Last-Modified: Thu, 13 Aug 2009 16:59:51 GMT <<<--- web page time stamp (for receiver's caching logic) Accept-Ranges: bytes <<<--- server accepts "bytes" Connection: close <<<--- one request and one response Content-Type: text/html <<<--- the following document is HTML formatted <<<--- notice the blank line to end the MIME block
Telnet www.bellics.net 80 <<<--- type this then hit <enter> GET / HTTP/1.0 <<<--- type this then hit <enter> <<<--- hit <enter> (a blank line to end the MIME block) HTTP/1.1 200 OK <<<--- start of the HTML response header Date: Mon, 08 Jun 2009 20:17:47 GMT <<<--- server's current time stamp Server: Apache/2.0.52 (OpenVMS) mod_ssl/2.0.52 OpenSSL/0.9.7d <<<--- web server flavor and version; ssl version Last-Modified: Thu, 13 Aug 2009 16:59:51 GMT <<<--- web page time stamp (for receiver's caching logic) Accept-Ranges: bytes <<<--- server accepts "bytes" Content-Length: 982 bytes <<<--- the HTML content block is 982 bytes Connection: close <<<--- one request and one response Content-Type: text/html <<<--- the following document is HTML formatted <<<--- notice the blank line to end the MIME block <html> <<<--- start of HTML content (the web page) <head> <title>Integrated Convergence Support Information System</title>Command Notes:
| line 1 | telnet to "www.bellics.net" using TCP/IP port 80 (telnet defaults to port 23) |
| line 2 | GET will pull back the whole web page; use HEAD or OPTIONS to only pull back server data |
| "/" requests the server's default document found in the root directory;
you could have also entered something like: "/default.htm" or "/login.html" or "/scripts/whatever" |
|
| HTTP/1.0 indicates we do not want a persistent connection etc. (keep things really simple in this demo) | |
| line 3 | a blank line indicates the end of the sender's HTML request block |
| line 1 | HTTP/1.1 | I am able to support HTTP version 1.1 (persistent connections, etc.) |
| 200 OK | HTTP status message indicating that everything went as planned | |
| line 2 | Date ... | server's current date + time usually in international format |
| line 3 | Server ... | Server software and installed security modules |
| line 4 | Last-Modified | last modified date of the file I am sending you (for your cache) |
Telnet www.bellics.net 80 <<<--- type this then hit <enter> GET / HTTP/1.1 <<<--- type this then hit <enter> host: www.bellics.net <<<--- mandatory with HTTP/1.1 content-type: text/html <<<--- optional: says "I can process HTML documents" connection: close <<<--- optional: return a page then close (do not persist) <<<--- hit <enter> (a blank line to end the MIME block) HTTP/1.1 200 OK <<<--- start of the HTML response header Date: Mon, 08 Jun 2009 20:17:47 GMT <<<--- server's current time stamp Server: Apache/2.0.52 (OpenVMS) mod_ssl/2.0.52 OpenSSL/0.9.7d <<<--- web server flavor and version; ssl version Last-Modified: Thu, 13 Aug 2009 16:59:51 GMT <<<--- web page time stamp (for receiver's caching logic) Accept-Ranges: bytes <<<--- server accepts "bytes" Content-Length: 982 bytes <<<--- the HTML content block is 982 bytes Connection: close <<<--- one request and one response Content-Type: text/html <<<--- the following document is HTML formatted <<<--- notice the blank line to end the MIME block <html> <<<--- start of HTML content (the web page) <head> <title>Integrated Convergence Support Information System</title>
Caveats:
<ur> Telnet 192.168.210.220 80 !connect to proxy server on port 80 <sr> %TCPWARE_TELNET-I-TRYING, trying concealed.ca,http (192.168.210.220,80) ...
%TCPWARE_TELNET-I-ESCCHR, escape (attention) character is "^\" <ur> CONNECT www.bellics.com:80 HTTP/1.1 ! connect to node on port 80 using HTTP/1.1 ! blank line ends MIME block <sr> HTTP/1.1 200 Connection established ! proxy has connected <ur> GET / HTTP/1.1 !
host: www.bellics.com !
content-type: text/html !
connection: close ! ! blank line ends MIME block <sr> HTTP/1.1 200 OK
Date: Mon, 08 Jun 2009 20:17:47 GMT
Server: Apache/2.0.52 (OpenVMS) mod_ssl/2.0.52 OpenSSL/0.9.7d
Last-Modified: Thu, 13 Aug 2009 16:59:51 GMT
Accept-Ranges: bytes
Content-Length: 982 bytes
Connection: close
Content-Type: text/html
<html>
<head>
<title>Integrated Convergence Support Information System</title>
$PRODUCT INSTALL /destination=disk$user1:[000000]
Compaq states that an ODS-5 volume is not required for a non-JAVA installation of SWS, but I've found that the online documentation for "mod ssl User" will be corrupt due to the presence of filenames with multiple dots (which is supported in the optional ODS-5 but not the standard ODS-2). What's worse is that you won't see any error messages during installation to an ODS-2 disk. Because I thought that other things could have become compromised, I decided to only install to ODS-5 volumes.
This paragraph has nothing to do with the web servers but I decided to mention it here anyway. If you've enabled ODS-5 then you might notice a few strange changes:
If a file is created by an application program written in a high level language (e.g. BASIC, C, C++, etc.) and the file name was defined using lower case characters, and the file doesn't yet exist, then when the file is created you will see a lower case name in the associated directory. If the file already exists, a new file of the same name and location will match the case of the original file.
This DCL command (in effect by default) will make your interactive session work the ODS-2 way on an ODS-5 system.
$set proc/parse_style=traditional/case_lookup=blind
This command will allow you to make your process case-sensitive (so you can rename a file changing its case):
$set proc/parse_style=extended/case_lookup=sensitive
CAVEAT: If your system has been running for years in case-blind mode, then it would be a real bad idea to place this case-sensitive entry into system file "SYS$MANAGER:SYLOGIN.COM". However, it is a completely different situation if your system is new AND all users will be running in case-sensitive mode. Consult HP OpenVMS System Manager's Manual, Volume 1: Essentials before you make any changes affecting more than one account. I have encountered situations were a user couldn't even log off.
HP released SWS-2.0 (which is based upon Apache 2.0.47) in December of 2003. One shocking change is that all served up web pages (text files) must be first converted to STREAM_LF before they can be used. There were several reasons given in newsgroup: comp.os.vms (and archived here http://groups.google.ca/group/comp.os.vms/ ) which included:
IMHO, they should have created an Apache plug-in (mod_rms ?) to allow backward compatibility when desired. A good work around for this restriction involves setting up PHP to pickup and process unconverted HTML files.
A second annoying problem is related to intermittent CGI operation where not all dynamic content gets to your browser.
Here is how it fails on my lab system:
Status: 200 Content-Type: text/htmlwhich is approximately 100K bytes in size (100 char x 1000 lines ). BTW, this works 100% of the time with CSWS-1.3
<HTML><HEAD></HEAD><BODY><pre> 0001 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 0002 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 ...996 more lines go here... 0999 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
1000 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
</pre></BODY></HTML>
[Sat Jul 10 16:07:21 2004] [error] [client 142.180.39.24] (00000870)end of file: Error string not specified yet: ap_content_length_filter: apr_bucket_read() failed, referer: http://142.180.39.98/neil.html [Sat Jul 10 16:07:47 2004] [error] [client 142.180.39.24] (00000870)end of file: Error string not specified yet: ap_content_length_filter: apr_bucket_read() failed, referer: http://142.180.39.98/neil.html [Sat Jul 10 16:07:51 2004] [error] [client 142.180.39.24] (00000870)end of file: Error string not specified yet: ap_content_length_filter: apr_bucket_read() failed, referer: http://142.180.39.98/neil.html [Sat Jul 10 16:07:56 2004] [error] [client 142.180.39.24] (00000870)end of file: Error string not specified yet: ap_content_length_filter: apr_bucket_read() failed, referer: http://142.180.39.98/neil.html [Sat Jul 10 16:07:58 2004] [error] [client 142.180.39.24] (00000870)end of file: Error string not specified yet: ap_content_length_filter: apr_bucket_read() failed, referer: http://142.180.39.98/neil.html [Sat Jul 10 16:08:06 2004] [notice] Graceful restart requested, doing restart [Sat Jul 10 16:08:09 2004] [notice] Apache/2.0.47 (OpenVMS) mod_jk2/2.0.3-dev configured -- resuming normal operations
The following links may shed more light on the subject.
- http://hypermail.linklord.com/new-httpd.old/2002/Aug/0374.html (output problem described)
- http://forums.devshed.com/archive/t-137905 (input problem described)
- http://httpd.apache.org/docs-2.0/filter.html (Apache Documentation)
- http://www.onlamp.com/pub/a/apache/2001/08/23/apache_2.html (writing Apache filters)
Update 2004-07-14:
Update 2004-08-23:
EnableMMAP Off DefaultType text/plain
$ set proc/prior=8and that this didn't cause a problem until we upgraded from OpenVMS-7.3-1 (Clydesdale) to OpenVMS-7.3-2 (Thoroughbred). No one remembers why this line was placed here, but assume it was necessary on VAX so that the STARTUP process would not become bogged down trying to compete with the tasks it was starting.
Analyzing Apache error log files will show a huge number of references to a missing file named favicon.ico
#
# file: [.conf]httpd.conf
#
{ ...snip... }
# need this next line for favicon.ico (NSR - 2012-08-09)
#
AddType image/x-icon .ico
We've got some AJAX code running and noticed that certain apps are continually (every minute) pulling back three little gifs. What is worse is that these gifs are sent over the encrypted channel (which adds additional overhead) and the problem is multiplied by the fact that ~100 employees are using the app at the same time. You can't control how a user sets up his browser "cache-wise", but this little tweak has stopped the problem on my system:
#
# file: [.conf]httpd.conf
#
{ ...snip... }
LoadModule expires_module modules/mod_expires.exe
LoadModule headers_module modules/mod_headers.exe
{ ...snip... }
#----------------------------------------------------------
# attempt to control the gifs constantly sent ajax
#
# note: 'Expires' requires mod_expire (see Loadmodule above)
# 'Header' requires mod_headers (see Loadmodule above)
#
<filesMatch "\.(ico|gif|jpg|png)$">
ExpiresActive On
ExpiresDefault "access plus 1 month"
Header append Cache-Control "public"
#---------------------------------------------------------
# This next delay is for 4 weeks: (60x60x24x28)
# Header set Cache-Control "max-age=2419200, public"
#---------------------------------------------------------
</filesMatch>
{ ...snip... }
#
# file: [.conf]ssl.conf
#
{ ...snip... }
#
# this old Apache declaration is no long 100% true (why treat all IE browsers badly?)
#
#SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
#
# experimental hack to speed up SSL for IE users - NSR (2012-08-13)
#
#BrowserMatch "MSIE [1-4]" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
#BrowserMatch "MSIE [5-9]" ssl-unclean-shutdown
#
# experimental hack to speed up SSL for IE users - NSR (2012-08-14)
#
# note: "MSIE 1" (above) didn't support SSL so it is superfluous
# Meanwhile, "MSIE 1" probably break MSIE 10 when it finally appears)
#
BrowserMatch ".*MSIE [2-5].*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
<sr> $
<ur> sh time
<sr> 27-NOV-2005 20:52:11
$
<ur> dir [...]*.*/siz=all/date/sel=siz=min=10000
<sr> Directory APACHE$COMMON:[000000.SPECIFIC.KAWC15.LOGS]
ACCESS_LOG.;1 1061068/1061095 16-SEP-2003 19:48:46.00
ERROR_LOG.;1 455636/455700 16-SEP-2003 19:48:44.50
SSL_ENGINE_LOG.;1 238230/238280 16-SEP-2003 19:48:44.56
$
<ur> del APACHE$COMMON:[000000.SPECIFIC.KAWC15.LOGS]*_log*.*;*
Notes:
$ set def sys$common:[000000.specific.www.logs] ! $ ren *_log*.* [.log31] ! okay to do this while files are open $ @APACHE$COMMON:[000000]APACHE$SETUP ! create some symbols
$ httpd -k flush ! tell Apache to flush the logs to disk
$ httpd -k new ! tell Apache to close current file then open new ones
Back
to OpenVMS
Back
to Home