Nginx+tomcat configuration under Linux

Source: Internet
Author: User

Ask B brother made a server, DEBIAN7, install the environment, Tomcat and Nginx have. But my Tomcat by default is port 8080, and direct access is the 80 port of Nginx listening. I'd like to have a reverse proxy just 80 to 8080.

1. After installing NG and Tomcat:

2. You can see the Nginx configuration file nginx.conf

VI Go to edit view

3. You can see the *.conf contained in the CONF.D directory, that is, any conf suffix file, it tells us that their own configuration file is best placed there, so it will take effect, unless you delete this line.


4. So we jump to the CONF.D directory to create a xxx.conf, the name is random, the suffix is the same as the line.

5. From can know direct access 80 will automatically get 8080, oh, just so happy agent, this is just simple configuration, complex point can go to Baidu some of the configuration of some clusters. Be sure to remember the service nginx restart, restart the services Oh.

Nginx+tomcat configuration under Linux

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.