The Apache server itself does not provide a Servlet/JSP container. Therefore, in practical applications, integrating Tomcat with the Apache server can create a commercially valuable Web platform with practical value.
Install Apache server
Run apache_2.0.63-win32-x86-no_ssl.msi, you will start the Apache server installation program, just install it according to the default settings. If the installation is successful, the Apache HTTP service will be automatically added to Windows.
Assuming the root directory of the Apache server is, there is a configuration file httpd.conf in its conf subdirectory. If Apache is installed on this machine and the default port 80 is used as the HTTP port, you will see the following properties in the httpd.conf file:
Listen 80
In the operating system Start]→[Program]→[Apache HTTP Server 2.0]→[ControApacheServer] menu provides submenus for restart, start and stop Apache servers.
Tips
You should make sure that port 80 of the operating system is not occupied, otherwise the Apache server will not start. Once the Apache server is started, you can determine if the installation was successful by accessing the Apache test page.
Add JK plugin to Apache server
To add JK plugin to Apache server, just copy mod_jk.so to /modules directory.
Create workers.properties file
The Apache server treats Tomcat as a worker working for itself. The workers.properties file is used to configure Tomcat information, which is stored in /conf/workers.
properties. The workers.properties file is provided in the sourcecode/chapter26/windows_apache directory of the book's bonus CD. Its contents are as follows ("#" followed by comment information):
worker.list=worker1worker.worker1.port =8009 #Working port, if not occupied, do not modify worker.worker1.host=localhost #Tomcat server address worker.worker1.type=ajp13 #typeworker.worker1.lbfactor=1 #Load balancing factor
The above worker.list specifies the list of Tomcat servers. For example, "worker.list=worker1" means there is only one Tomcat server named "worker1". For example, "worker.list=worker1,worker2" means that there are two
Tomcat servers named "worker1" and "worker2". Worker.worker1.port and worker.worker1.host are used to set the properties of the Tomcat server named "worker1". If you want to set the port property of worker2, you can use the form "worker.worker2.port=8109".
Test Configuration
Restart the Tomcat server and Apache server, and access http://localhost/index.jsp through the browser. If the default home page of Tomcat appears, the configuration is successful. In addition, if the helloapp application has been released on the Tomcat server (copy the helloapp directory in the sourcecode/chapter26 directory of the book's bonus CD to the /webapps directory), you can visit http://localhost/helloapp/hello.htm If the hello.htm webpage of the helloapp application is returned normally, the configuration has been successful. If the configuration is incorrect, you can view the log information generated by the JK plugin, which helps to find the cause of the error. Set the log file location to /logs/mod_jk.log in the Apache server configuration file httpd.conf.
Recently, many users have reported that the CD-ROM drive automatically pops up when they use the Win
Every time you turn on your computer and log in to Windows, you will see a long boot screen. Many st
In the xp system, in order to ensure the security and stability of the system, the system automatica
When using an XP laptop to connect to a wireless network, sometimes you will be prompted to cannot f
Combined with the example analysis ASP file upload principle
If the MSN can not log in under Windows
How can the service security of vista system improve
How does the XP system display the file extension?
How to use the firewall in vista and precautions
After upgrading to XP, the performance of the optical drive and the hard disk is degraded
Office Tips: Win XP Fax Features
Windows Disc Production U disk installation system
How to protect account security in Windows XP system three tricks
Win98, Win2K multiple operating system uninstall method
A comprehensive understanding of Windows software restriction policies
WinXP saves resources and can configure the service by itself.
Win7, XP system disable and restore control panel, registry editor, group policy method
Win10 application can not start normally 0xc0000018 error solution
The problem of files that cannot be moved when the C disk is defragmented
How to use Bluetooth to connect mobile phones to achieve file transfer under win8 system
Windows 8 downgrade rights: can be reduced to Win7, Vista
Win10 system update driver causes device exception handling method
Win8 Microsoft Pinyin input method detailed
Windows 7 hard disk partitioning method