Re: CGI help

new topic     » goto parent     » topic index » view thread      » older message » newer message
euphoric said...
GeorgeWalters said...
euphoric said...

What if you start with http://localhost/home.html?

Well, that's interesting. I don't know where that is. If I put that in the address bar IE doensn't know where it is either.

There's a directory specified in http.conf like this:

DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"

What you probably need is this (if it's not already):

DocumentRoot "C:/AcuTrackWebDevelopment/CBSI/acu-track.com/web"

This tells Apache where to look for localhost files.

You have to always use an HTTP URL. You cannot just use a file path.

Well I did that and http://localhost/cgitest.exw works so does http://acu-track.com/cgitest.exw

but the root is not preprended to /cgi/cgitest.exw when the calling html page links. I have here my entire httpd.conf if you can see something amis. I know it's simple but I don't see it.

  1. #
  2. This is the main Apache HTTP server configuration file. It contains the
  3. configuration directives that give the server its instructions.
  4. See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
  5. In particular, see
  6. <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
  7. for a discussion of each configuration directive.
  8. #
  9. Do NOT simply read the instructions in here without understanding
  10. what they do. They're here only as hints or reminders. If you are unsure
  11. consult the online docs. You have been warned.
  12. #
  13. Configuration and logfile names: If the filenames you specify for many
  14. of the server's control files begin with "/" (or "drive:/" for Win32), the
  15. server will use that explicit path. If the filenames do *not* begin
  16. with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
  17. with ServerRoot set to "C:/Program Files/Apache Software Foundation/Apache2.2" will be interpreted by the
  18. server as "C:/Program Files/Apache Software Foundation/Apache2.2/logs/foo.log".
  19. #
  20. NOTE: Where filenames are specified, you must use forward slashes
  21. instead of backslashes (e.g., "c:/apache" instead of "c:\apache").
  22. If a drive letter is omitted, the drive on which httpd.exe is located
  23. will be used by default. It is recommended that you always supply
  24. an explicit drive letter in absolute paths to avoid confusion.
  1. #
  2. ServerRoot: The top of the directory tree under which the server's
  3. configuration, error, and log files are kept.
  4. #
  5. Do not add a slash at the end of the directory path. If you point
  6. ServerRoot at a non-local disk, be sure to point the LockFile directive
  7. at a local disk. If you wish to share the same ServerRoot for multiple
  8. httpd daemons, you will need to change at least LockFile and PidFile.
  9. ServerRoot "C:/Program Files/Apache Software Foundation/Apache2.2"
  1. #
  2. Listen: Allows you to bind Apache to specific IP addresses and/or
  3. ports, instead of the default. See also the <VirtualHost>
  4. directive.
  5. #
  6. Change this to Listen on specific IP addresses as shown below to
  7. prevent Apache from glomming onto all bound IP addresses.
  8. #
  9. Listen 12.34.56.78:80 Listen 80
  1. #
  2. Dynamic Shared Object (DSO) Support
  3. #
  4. To be able to use the functionality of a module which was built as a DSO you
  5. have to place corresponding `LoadModule' lines at this location so the
  6. directives contained in it are actually available _before_ they are used.
  7. Statically compiled modules (those listed by `httpd -l') do not need
  8. to be loaded here.
  9. #
  10. Example:
  11. LoadModule foo_module modules/mod_foo.so
  12. LoadModule actions_module modules/mod_actions.so LoadModule alias_module modules/mod_alias.so LoadModule asis_module modules/mod_asis.so LoadModule auth_basic_module modules/mod_auth_basic.so
  13. LoadModule auth_digest_module modules/mod_auth_digest.so
  14. LoadModule authn_alias_module modules/mod_authn_alias.so
  15. LoadModule authn_anon_module modules/mod_authn_anon.so
  16. LoadModule authn_dbd_module modules/mod_authn_dbd.so
  17. LoadModule authn_dbm_module modules/mod_authn_dbm.so LoadModule authn_default_module modules/mod_authn_default.so LoadModule authn_file_module modules/mod_authn_file.so
  18. LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
  19. LoadModule authz_dbm_module modules/mod_authz_dbm.so LoadModule authz_default_module modules/mod_authz_default.so LoadModule authz_groupfile_module modules/mod_authz_groupfile.so LoadModule authz_host_module modules/mod_authz_host.so
  20. LoadModule authz_owner_module modules/mod_authz_owner.so LoadModule authz_user_module modules/mod_authz_user.so LoadModule autoindex_module modules/mod_autoindex.so
  21. LoadModule cache_module modules/mod_cache.so
  22. LoadModule cern_meta_module modules/mod_cern_meta.so LoadModule cgi_module modules/mod_cgi.so
  23. LoadModule charset_lite_module modules/mod_charset_lite.so
  24. LoadModule dav_module modules/mod_dav.so
  25. LoadModule dav_fs_module modules/mod_dav_fs.so
  26. LoadModule dav_lock_module modules/mod_dav_lock.so
  27. LoadModule dbd_module modules/mod_dbd.so
  28. LoadModule deflate_module modules/mod_deflate.so LoadModule dir_module modules/mod_dir.so
  29. LoadModule disk_cache_module modules/mod_disk_cache.so
  30. LoadModule dumpio_module modules/mod_dumpio.so LoadModule env_module modules/mod_env.so
  31. LoadModule expires_module modules/mod_expires.so
  32. LoadModule ext_filter_module modules/mod_ext_filter.so
  33. LoadModule file_cache_module modules/mod_file_cache.so
  34. LoadModule filter_module modules/mod_filter.so
  35. LoadModule headers_module modules/mod_headers.so
  36. LoadModule ident_module modules/mod_ident.so
  37. LoadModule imagemap_module modules/mod_imagemap.so LoadModule include_module modules/mod_include.so
  38. LoadModule info_module modules/mod_info.so LoadModule isapi_module modules/mod_isapi.so
  39. LoadModule ldap_module modules/mod_ldap.so
  40. LoadModule logio_module modules/mod_logio.so LoadModule log_config_module modules/mod_log_config.so
  41. LoadModule log_forensic_module modules/mod_log_forensic.so
  42. LoadModule mem_cache_module modules/mod_mem_cache.so LoadModule mime_module modules/mod_mime.so
  43. LoadModule mime_magic_module modules/mod_mime_magic.so LoadModule negotiation_module modules/mod_negotiation.so
  44. LoadModule proxy_module modules/mod_proxy.so
  45. LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
  46. LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
  47. LoadModule proxy_connect_module modules/mod_proxy_connect.so
  48. LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
  49. LoadModule proxy_http_module modules/mod_proxy_http.so
  50. LoadModule rewrite_module modules/mod_rewrite.so LoadModule setenvif_module modules/mod_setenvif.so
  51. LoadModule speling_module modules/mod_speling.so
  52. LoadModule ssl_module modules/mod_ssl.so
  53. LoadModule status_module modules/mod_status.so
  54. LoadModule substitute_module modules/mod_substitute.so
  55. LoadModule unique_id_module modules/mod_unique_id.so
  56. LoadModule userdir_module modules/mod_userdir.so
  57. LoadModule usertrack_module modules/mod_usertrack.so
  58. LoadModule version_module modules/mod_version.so
  59. LoadModule vhost_alias_module modules/mod_vhost_alias.so

<IfModule !mpm_netware_module> <IfModule !mpm_winnt_module>

  1. #
  2. If you wish httpd to run as a different user or group, you must run
  3. httpd as root initially and it will switch.
  4. #
  5. User/Group: The name (or #number) of the user/group to run httpd as.
  6. It is usually good practice to create a dedicated user and group for
  7. running httpd, as with most system services.
  8. User daemon Group daemon

</IfModule> </IfModule>

  1. 'Main' server configuration
  2. #
  3. The directives in this section set up the values used by the 'main'
  4. server, which responds to any requests that aren't handled by a
  5. <VirtualHost> definition. These values also provide defaults for
  6. any <VirtualHost> containers you may define later in the file.
  7. #
  8. All of these directives may appear inside <VirtualHost> containers,
  9. in which case these default settings will be overridden for the
  10. virtual host being defined.
  11. #
  1. #
  2. ServerAdmin: Your address, where problems with the server should be
  3. e-mailed. This address appears on some server-generated pages, such
  4. as error documents. e.g. admin@your-domain.com
  5. ServerAdmin gwalters@acu-track.com
  1. #
  2. ServerName gives the name and port that the server uses to identify itself.
  3. This can often be determined automatically, but we recommend you specify
  4. it explicitly to prevent problems during startup.
  5. #
  6. If your host doesn't have a registered DNS name, enter its IP address here.
  7. #
  8. ServerName localhost:80
  1. #
  2. DocumentRoot: The directory out of which you will serve your
  3. documents. By default, all requests are taken from this directory, but
  4. symbolic links and aliases may be used to point to other locations.
  5. #
  6. DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"

DocumentRoot "C:/AcuTrackWebDevelopment/CBSI/acu-track.com"

  1. #
  2. Each directory to which Apache has access can be configured with respect
  3. to which services and features are allowed and/or disabled in that
  4. directory (and its subdirectories).
  5. #
  6. First, we configure the "default" to be a very restrictive set of
  7. features.
  8. <Directory /> Options FollowSymLinks AllowOverride None Order deny,allow Deny from all </Directory>

<Directory "C:/AcuTrackWebDevelopment/CBSI/acu-track.com"> Options FollowSymLinks +ExecCGI AllowOverride None Order allow,deny allow from all </Directory>

<Directory "C:/AcuTrackWebDevelopment/CBSI/lc.acu-track.com"> Options FollowSymLinks +ExecCGI AllowOverride None Order allow,deny allow from all </Directory>

  1. #
  2. Note that from this point forward you must specifically allow
  3. particular features to be enabled - so if something's not working as
  4. you might expect, make sure that you have specifically enabled it
  5. below.
  6. #
  1. #
  2. This should be changed to whatever you set DocumentRoot to.
  3. <Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs">
  4. #
  5. Possible values for the Options directive are "None", "All",
  6. or any combination of:
  7. Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
  8. #
  9. Note that "MultiViews" must be named *explicitly*
  10. doesn't give it to you.
  11. #
  12. The Options directive is both complicated and important. Please see
  13. http://httpd.apache.org/docs/2.2/mod/core.html#options
  14. for more information.
  15. Options Indexes FollowSymLinks
  1. #
  2. AllowOverride controls what directives may be placed in .htaccess files.
  3. It can be "All", "None", or any combination of the keywords:
  4. Options FileInfo AuthConfig Limit
  5. AllowOverride None
  1. #
  2. Controls who can get stuff from this server.
  3. Order allow,deny Allow from all

</Directory>

  1. #
  2. DirectoryIndex: sets the file that Apache will serve if a directory
  3. is requested.
  4. <IfModule dir_module> DirectoryIndex home.html #index.html </IfModule>
  1. #
  2. The following lines prevent .htaccess and .htpasswd files from being
  3. viewed by Web clients.
  4. <FilesMatch "^\.ht"> Order allow,deny Deny from all Satisfy All </FilesMatch>
  1. #
  2. ErrorLog: The location of the error log file.
  3. If you do not specify an ErrorLog directive within a <VirtualHost>
  4. container, error messages relating to that virtual host will be
  5. logged here. If you *do* define an error logfile for a <VirtualHost>
  6. container, that host's errors will be logged there and not here.
  7. ErrorLog "logs/error.log"
  1. #
  2. LogLevel: Control the number of messages logged to the error_log.
  3. Possible values include: debug, info, notice, warn, error, crit,
  4. alert, emerg.
  5. LogLevel warn

<IfModule log_config_module>

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

<IfModule logio_module>

  1. You need to enable mod_logio.c to use %I and %O LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio </IfModule>
  1. #
  2. The location and format of the access logfile (Common Logfile Format).
  3. If you do not define any access logfiles within a <VirtualHost>
  4. container, they will be logged here. Contrariwise, if you *do*
  5. define per-<VirtualHost> access logfiles, transactions will be
  6. logged therein and *not* in this file.
  7. CustomLog "logs/access.log" common
  1. #
  2. If you prefer a logfile with access, agent, and referer information
  3. (Combined Logfile Format) you can use the following directive.
  4. #
  5. CustomLog "logs/access.log" combined </IfModule>

<IfModule alias_module>

  1. #
  2. Redirect: Allows you to tell clients about documents that used to
  3. exist in your server's namespace, but do not anymore. The client
  4. will make a new request for the document at its new location.
  5. Example:
  6. Redirect permanent /foo http://localhost/bar
  1. #
  2. Alias: Maps web paths into filesystem paths and is used to
  3. access content that does not live under the DocumentRoot.
  4. Example:
  5. Alias /webpath /full/filesystem/path
  6. #
  7. If you include a trailing / on /webpath then the server will
  8. require it to be present in the URL. You will also likely
  9. need to provide a <Directory> section to allow access to
  10. the filesystem path.
  1. #
  2. ScriptAlias: This controls which directories contain server scripts.
  3. ScriptAliases are essentially the same as Aliases, except that
  4. documents in the target directory are treated as applications and
  5. run by the server when requested rather than as documents sent to the
  6. client. The same rules about trailing "/" apply to ScriptAlias
  7. directives as to Alias.
  8. #
  9. ScriptAlias /cgi-bin/ "C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin/"
  10. ScriptAlias /cgi/ "C:/AcuTrackWebDevelopment/CBSI/lc.acu-track.com/cgi/"

ScriptAlias /cgi/ "C:/AcuTrackWebDevelopment/CBSI/acu-track.com/cgi/"

</IfModule>

<IfModule cgid_module>

  1. #
  2. ScriptSock: On threaded servers, designate the path to the UNIX
  3. socket used to communicate with the CGI daemon of mod_cgid.
  4. #
  5. Scriptsock logs/cgisock </IfModule>
  1. #
  2. "C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin" should be changed to whatever your ScriptAliased
  3. CGI directory exists, if you have that configured.
  4. #

<Directory "C:/AcuTrackWebDevelopment/CBSI/acu-track.com/cgi"> Options FollowSymLinks +ExecCGI AllowOverride None Order allow,deny allow from all </Directory>

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

<IfModule mime_module>

  1. #
  2. TypesConfig points to the file containing the list of mappings from
  3. filename extension to MIME-type.
  4. TypesConfig conf/mime.types
  1. #
  2. AddType allows you to add to or override the MIME configuration
  3. file specified in TypesConfig for specific file types.
  4. #
  5. AddType application/x-gzip .tgz
  6. #
  7. AddEncoding allows you to have certain browsers uncompress
  8. information on the fly. Note: Not all browsers support this.
  9. #
  10. AddEncoding x-compress .Z
  11. AddEncoding x-gzip .gz .tgz
  12. #
  13. If the AddEncoding directives above are commented-out, then you
  14. probably should define those extensions to indicate media types:
  15. AddType application/x-compress .Z AddType application/x-gzip .gz .tgz
  1. #
  2. AddHandler allows you to map certain file extensions to "handlers":
  3. actions unrelated to filetype. These can be either built into the server
  4. or added with the Action directive (see below)
  5. #
  6. To use CGI scripts outside of ScriptAliased directories:
  7. (You will also need to add "ExecCGI" to the "Options" directive.)
  8. AddHandler cgi-script .cgi .exw
  1. For type maps (negotiated resources):
  2. AddHandler type-map var
  1. #
  2. Filters allow you to process content before it is sent to the client.
  3. #
  4. To parse .shtml files for server-side includes (SSI):
  5. (You will also need to add "Includes" to the "Options" directive.)
  6. #
  7. AddType text/html .shtml
  8. AddOutputFilter INCLUDES .shtml </IfModule>
  1. #
  2. The mod_mime_magic module allows the server to use various hints from the
  3. contents of the file itself to determine its type. The MIMEMagicFile
  4. directive tells the module where the hint definitions are located.
  5. #
  6. MIMEMagicFile conf/magic
  1. #
  2. Customizable error responses come in three flavors:
  3. 1) plain text 2) local redirects 3) external redirects
  4. #
  5. Some examples:
  6. ErrorDocument 500 "The server made a boo boo."
  7. ErrorDocument 404 /missing.html
  8. ErrorDocument 404 "/cgi-bin/missing_handler.pl"
  9. ErrorDocument 402 http://localhost/subscription_info.html
  10. #
  1. #
  2. EnableMMAP and EnableSendfilefile: On systems that support it,
  3. memory-mapping or the sendfile syscall is used to deliver
  4. files. This usually improves server performance, but must
  5. be turned off when serving from networked-mounted
  6. filesystems or if support for these functions is otherwise
  7. broken on your system.
  8. #
  9. EnableMMAP off
  10. EnableSendfile off
  1. Supplemental configuration
  2. #
  3. The configuration files in the conf/extra/ directory can be
  4. included to add extra features or to modify the default configuration of
  5. the server, or you may simply copy their contents here and change as
  6. necessary.
  1. Server-pool management (MPM specific)
  2. Include conf/extra/httpd-mpm.conf
  1. Multi-language error messages
  2. Include conf/extra/httpd-multilang-errordoc.conf
  1. Fancy directory listings
  2. Include conf/extra/httpd-autoindex.conf
  1. Language settings
  2. Include conf/extra/httpd-languages.conf
  1. User home directories
  2. Include conf/extra/httpd-userdir.conf
  1. Real-time info on requests and configuration
  2. Include conf/extra/httpd-info.conf
  1. Virtual hosts
  2. Include conf/extra/httpd-vhosts.conf
  1. Local access to the Apache HTTP Server Manual
  2. Include conf/extra/httpd-manual.conf
  1. Distributed authoring and versioning (WebDAV)
  2. Include conf/extra/httpd-dav.conf
  1. Various default settings
  2. Include conf/extra/httpd-default.conf
  1. Secure (SSL/TLS) connections
  2. Include conf/extra/httpd-ssl.conf
  3. #
  4. Note: The following must must be present to support
  5. starting without SSL on platforms with no /dev/random equivalent
  6. but a statically compiled-in mod_ssl.
  7. <IfModule ssl_module> SSLRandomSeed startup builtin SSLRandomSeed connect builtin </IfModule>
  8. JRun Settings LoadModule jrun_module "C:/ColdFusion8/runtime/lib/wsconfig/1/mod_jrun22.so" <IfModule mod_jrun22.c> JRunConfig Verbose false JRunConfig Apialloc false JRunConfig Ignoresuffixmap false JRunConfig Serverstore "C:/ColdFusion8/runtime/lib/wsconfig/1/jrunserver.store" JRunConfig Bootstrap 127.0.0.1:51011
  9. JRunConfig Errorurl url <optionally redirect to this URL on errors>
  10. JRunConfig ProxyRetryInterval 600 <number of seconds to wait before trying to reconnect to unreachable clustered server>
  11. JRunConfig ConnectTimeout 15 <number of seconds to wait on a socket connect to a jrun server>
  12. JRunConfig RecvTimeout 300 <number of seconds to wait on a socket receive to a jrun server>
  13. JRunConfig SendTimeout 15 <number of seconds to wait on a socket send to a jrun server> AddHandler jrun-handler .jsp .jws </IfModule>

Include conf/virtual-hosts.conf

Here also is virtual-hosts.conf

  1. Use name-based virtual hosting NameVirtualHost *:80

<VirtualHost *:80>

ServerName lc.acu-track.com DocumentRoot C:/AcuTrackWebDevelopment/CBSI/lc.acu-track.com CustomLog logs/lc.acu-track.com.access.log combined ErrorLog logs/lc.acu-track.com.error.log

</VirtualHost>

<VirtualHost *:80>

ServerName acu-track.com DocumentRoot C:/AcuTrackWebDevelopment/CBSI/acu-track.com CustomLog logs/acu-track.com.access.log combined ErrorLog logs/acu-track.com.error.log

</VirtualHost>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu