Nginx Load balancer does not load Css,js Zhang Yi f5 load Balancing nginx TCP load

Source: Internet
Author: User
After configuring Nginx, when accessing Tomcat, Tomcat displays such as:

From this state can be seen, guess is CSS and JS these files are not loaded.

In addition, access to the pages deployed on the Tomcat project is the same, with different nginx accesses to the project under Tomcat such as:

Through Nginx as a proxy server, access to the page is like this:

These conditions are obviously due to the server through Nginx as load balancer, unable to load the CSS and JS these files, such as this problem, through a search and find, modify the nginx nginx.conf configuration file to be displayed normally, modify the configuration as follows:

Added such a configuration for loading css,js and picture files.

In the jsp_server refers to the woolen, in fact, is the upstream configuration.

Summary: Nginx as a Load balancer server, the ability to load css,js and picture files, you need to add in the configuration file about the static file loading, that is, the configuration of the Proxy_pass property. There may be other better ways.


The above describes the Nginx do load balancer can not load css,js, including nginx, load balancing aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

  • Related Article

    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.