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