Linux notes (--nginx) agent Tomcat

Source: Internet
Author: User
Nginx is a reverse proxy server, it can proxy PHP, also can proxy tomcat

First, you have to install the nginx,jdk,tomcat.

The installation of Tomcat is simple and can be run by extracting it.

Then go to the directory where the Ngxin configuration file is located, mine is in/usr/local/nginx/conf

Create a profile, try to avoid modifying the original configuration file, at the time of opening using the configuration file we created can be

vim jsp.conf

The contents are as follows:

4;events{        1024;}http{    server {        80;        server_name localhost;        location ~ \.jsp$ {            root /usr/local/tomcat/webapps;            indexindex.jsp;            proxy_pass http://localhost:8080;        }    }}

The above configuration indicates that listening on port 80, all addresses with the end of the. JSP are forwarded to localhost:8080, which is Tomcat. Project catalog is deployed under/usr/local/tomcat/webapps

Then start Tomcat

cd /usr/local/tomcat/bin./startup.sh

Start Ngxin, using the configuration file we just created

/usr/local-c /usr/local/nginx/conf/jsp.conf

'). addclass (' pre-numbering '). Hide (); $ (this). addclass (' has-numbering '). Parent (). append ($numbering); for (i = 1; i <= lines; i++) {$numbering. Append ($ ('
  • '). Text (i)); }; $numbering. FadeIn (1700); }); });

    The above describes the Linux note (--nginx) agent Tomcat, including aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

  • 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.