Nginx + Tomcat 6 Configuration

Source: Internet
Author: User

 

1. Install nginx and tomcat, assuming the nginx-0.7.65, tomcat6.x. Nginx can be downloaded from http://nginx.org/en/download.html.

#./Configure

# Make

# Make install

After installation, nginx is installed in the/usr/local/nginx/directory by default. The start command is/usr/local/nginx/sbin/nginx, the default configuration file is/usr/local/nginx/CONF/nginx. conf.

After installation, run the following command to check the correctness of the configuration file:

#/Usr/local/nginx/sbin/nginx-T

Run the following command to start nginx

#/Usr/local/nginx/sbin/nginx

After startup, you can access http: // localhost to check whether the installation is correct.

2. Modify the/usr/local/nginx/CONF/nginx. conf file, modify or add the "Location/" configuration.CodeThe Tomcat port is 8080.

Location/{<br/> proxy_pass http: // localhost: 8080; <br/>} 

3. Restart Tomcat and nginx and access http: // localhost/examples/to view the examples application that comes with Tomcat.

 

References:

Http://nginx.org/en

Http://wiki.nginx.org/Main

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.