Install ViewCVS under Tomcat

xiaoxiao2021-03-06  51

To run Viewcvs under Tomcat, first configure Tomcat to support CGI

In order to make Tomcat to run CGI, you have to do the following things: 1. Remove servlets-cgi.renametojar (in a catalina_home / server / lib / directory) to servlets-cgi.jar. Handling the servlet of CGI should be located under the classpath of Tomcat. 2. In the Tomcat's Catalina_Base / Conf / Web.xml file, remove the annotation of the paragraph of CGI (by default, this paragraph is located 241). 3. Similarly, in Tomcat's Catalina_Base / Conf / Web.xml file, the annotation of the paragraph of mapping of CGI is removed (by default, this paragraph is located 299). Note that this content specifies how HTML links to the CGI script. 4. You can place the CGI script in a web-inf / cgi directory (note that web-inf is a safe place, you can put some files that don't want to be seen or safe to expose by the user), Or you can also place the CGI script in other directories under Context and adjust the CGIPATHPREFIX initialization parameters for the CGI Servlet. This is the actual location of the specified CGI Servlet and cannot be rename with the URL specified by the previous step. 5. Restart Tomcat, your CGI can run. In Tomcat, the CGI program is default in the web-INF / CGI directory. As mentioned earlier, the web-INF directory is protected, and the browser through the client cannot spy to the content, so for the placement of the password or This is a very nice place for CGI scripts of other sensitive information. To be compatible with other servers, although you can also save the CGI script in the traditional / cgi-bin directory, you have to know that the files in these directories may be seen by the curious surfers on the Internet. In addition, in UNIX, determine that the user who runs Tomcat has permission to perform the CGI script.

The next is to install ViewCVS.

Run ./viewcvs-install, default installed in usr / local / viewcvs-version

Modify the configuration in the /viewcvs.conf file

Run http: // server: port / context / cgi-bin / viewcvs.cgi

转载请注明原文地址:https://www.9cbs.com/read-115689.html

New Post(0)