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.
Nowadays, it is common to use Vista and XP to form a dual system, so that when you encounter compati
Windows XP mode is based on Microsoft Virtual PC, which is to run Windows XP virtual machine on Wind
Normally the system start menu icon size is the default, some users think the start menu icon is too
In this age of personality, we also hope to have an imaginative system desktop, including beautiful
The win xp system is to protect the system file
The secret of the hidden file function of the xp system itself
XP system boot login interface how to prohibit
Rescuing the crashed Windows XP operating system
File System Conversion in Windows XP Operating System
WINDOWS XP system password forgot how to retrieve
The WinXP taskbar and the start menu of the nirvana
Small tricks to disable folder options under xp
Clear the tray garbage in Windows system to speed up the system speed
How multithreading is implemented in the win xp system
How to use Windows PE to retrieve the lost administrator password
Reasons for IIS to fail gzip open: wildcard application mapping
Win10 system copy the same name file overwrite without prompt box how to get back?
Win8.1 CD installation tutorial
What is the Win7 library? What is the library in the
Where is the Win10 computer drawing tool? How to open the computer drawing tool in Win10