DGW Migration FAQ

Provide feedback on the IBM HTTP Server forum on IBM developerWorks.

Other sources of information

URL mapping questions

Problems with double-slashes

Domino by default "simplifies" URL paths that contained double-slashes, such as http://www.example.com/icons//spacer.jpg. While these do not affect mapping of URL paths to the filesystem, they can affect other modules that work on the URI directly, such as the WAS WebServer Plug-in.

Here is a recipe to remove one double-slash from the URL path:

  1. Uncomment LoadModule for mod_rewrite near top of httod.conf
  2. Once at bottom of httpd.conf and once in each :
    RewriteEngine ON
    # Remove first double-slash from the path component of the URL
    RewriteRule ^(.*)//+(.*)$ $1/$2 [PT]
    

Translation questions

Are there any locale (LC_*) differences between DGW and IHS?

IHS doesn't call setlocale(LC_ALL, ""), so setting LC_* variables doesn't have any direct affect on locale-sensitive standard library calls.

CGI questions

Why isn't _BPX_USERID set for my CGI environment?

Domino unnecessarily set _BPX_USERID in a CGI's environment even though it already changed userids. Apache does not currently set this variable, but you can copy the "REMOTE_USER" variable to this variable to allow existing scripts to continue to function unchanged.


<Location /cgi-bin/test-cgi>
  # Example of SAF-authenticated resource.
  Authtype basic
  AuthName foo
  AuthBasicProvider saf
  Require valid-user
  SafRunAs  %%CLIENT%%

  # Copy REMOTE_USER to _BPX_USERID. Note that this only works when mod_rewrite
  # is configured in "directory" context. You cannot put this outside of
  # Location/Directory, as it will run prior to authentication.
  Options +FollowSymlinks
  RewriteEngine ON
  RewriteCond %{REMOTE_USER} (.+)
  RewriteRule .* - [E=_BPX_USERID:%1]
</Location>

FSCP and NETCP environment variables

These variables are not set by Apache. If you depend on them being set as a global configuration for a CGI, set them with SetEnv.

Why doesn't 'PULL PARSE' work in a REXX CGI?

If the POST body is not newline-terminated, PULL PARSE won't read any data. There is no reason for a POST body to be newline terminated. DGW had a workaround to accomodate this by adding data to the users POST body. Apache doesn't modify the body in this way.

How can a CGI opt out of otherwise configured translation?

Set CharsetOptions DGWCompat and then issue a response header of Content-Encoding: binary. This will be filtered out and short-circuit translation in 8.5.5 and later.

Authentication, authorization, and access control questions

What's the equivalent of the UserID directive?

While there is no direct equivalent, if UserID was being used to change to a different thread identity, mod_authnz_saf can do similar userid changes.