home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / internet / httpsvr / readme.txt < prev    next >
Encoding:
Text File  |  1998-03-27  |  3.4 KB  |  80 lines

  1. HttpSvr Installation and Tips
  2. =============================
  3.  
  4. HttpSvr is an MFC sample web server application. It operates as a
  5. single-document interface application, configured with an HttpSvr
  6. Configuration file (.HSC). You create HSC files by selecting "Save"
  7. from the "Server" menu. The application registers the HSC files with
  8. the system so that double-clicking on an HSC file will start HttpSvr.
  9. Multiple instances of HttpSvr can be running at any time, but only
  10. one can be listening on any particular port (80 being the default).
  11.  
  12. Setup Instructions
  13. ==================
  14. Step 1: Build the HttpSvr.exe project.
  15. Step 2: Create a root HTTP directory named "WebPages" in the root
  16.         folder of the same drive as the executable (see below).
  17. Step 3: Copy the folder "SvrAdmin" and all it's contents into the
  18.         root HTTP folder.
  19. Step 4: Run the copy of HttpSvr.exe on your hard drive.
  20.  
  21. Your are now ready to serve up your web pages. Keep in mind that if
  22. you make any changes to the default configuration, you'll have to
  23. save those settings into an HttpSvr Configuration file (.HSC) via the
  24. "Save" item on the "Server" menu, and launch future HttpSvr sessions
  25. from the resulting .HSC file in order to re-use those settings.
  26.  
  27.  
  28. Root HTTP Folder
  29. ================
  30.  
  31. By default, the server will attempt to serve-up files from the folder
  32. "WebPages" on the same drive as the executable. When you first run
  33. HttpSvr, if that folder does not exist, it will ask you if you want
  34. to create it. You do not have to use that folder; you can specify
  35. another. Just remember that a different root folder is a change in
  36. configuration and should be saved as a new HttpSvr Configuration file
  37. (.HSC).
  38.  
  39. It is highly recommended that you copy the SvrAdmin subfolder from the
  40. source directory to this folder so that the directory listing icons
  41. can be used by your server when a default document file is not
  42. available. For example, I put my root at C:\WebPages, and the tree
  43. looks something like:
  44.     C:\
  45.       WebPages\
  46.          SvrAdmin\
  47.          RonLo\
  48.          Cmd95\
  49.          HttpSvr\
  50. Everything in and under "WebPages" will be available for viewing over
  51. the web (as long as the hidden attribute is not set).
  52. ***Don't forget to copy "SvrAdmin"!!***
  53.  
  54. Tips
  55. ====
  56.  
  57. Unless you want people to be able to browse all the files in a
  58. directory FTP-like, include an HTML file named "default.html" that
  59. will get loaded automatically. HttpSvr is smart enough to look for
  60. default files with names like default.html, default.htm, index.html
  61. and index.htm.
  62.  
  63. If you do want people to be able to browse (like if you have a
  64. directory of files that can be downloaded), files with the "hidden"
  65. attribute set will not be available for download but will still be
  66. listed. If the SvrAdmin folder was not installed as a subfolder of
  67. your main root HTTP directory, directory listings will be quite ugly
  68. due to the server not finding the icons that should be there.
  69.  
  70. The most important directory to have a default.html file is the root
  71. HTTP folder.  This is the one people type in when they're not sure of
  72. any specific page names.  For example, my server's name is "RonLo."
  73. When someone types a URL of "http://RonLo" or just "RonLo", the
  74. default.html file in the root HTTP file gets loaded, and it tells
  75. them what all is on my server.
  76.  
  77. If none of the default HTML files are present, it will look for a CGI
  78. app named (you gessed it) default.exe. If it finds one, it will run
  79. it as a GET operation without any parameters.
  80.