Resin configuration details, resin details
Install JDK
JDK is the core of JAVA, including the java Runtime Environment, tools, and base class libraries.
Cd/usr/local/src/
Version 1.8.0 _ 162 downloaded from the official website
Mv jdk1.8.0 _ 162/usr/local/jdk1.8
Set Environment Variables
Vim/etc/profile
JAVA_HOME =/usr/local/jdk1.8/
JAVA_BIN =/usr/local/jdk1.8/bin
JRE_HOME =/usr/local/jdk1.8/jre
PATH = $ PATH:/usr/local/jdk1.8/bin:/usr/local/jdk1.8/jre/bin
CLASSPATH =/usr/local/jdk1.8/jre/lib:/usr/local/jdk1.8/lib:/usr/local/jdk1.8/jre/lib/charsets. jar
Execute the following command to take effect
Source/etc/profile
Check whether the settings are correct
Java-version
The following content indicates that the configuration is correct.
Java version "1.8.0 _ 162"
Java (TM) SE Runtime Environment (build 1.8.0 _ 162-b12)
Java HotSpot (TM) 64-Bit Server VM (build 25.162-b12, mixed mode)
Install resin
Tar zxvf resin-4.0.45.tar.gz
Cd resin-1, 4.0.45
./Configure -- prefix =/usr/local/resin -- with-java-home =/usr/local/jdk1.8
Make & make install
Start resin
/Etc/init. d/resin start
Ps aux | grep resin
Both netstat-lnp can check whether resin is successfully started.
Configure resin
Cd/usr/local/resin/conf/
Structure:
The VM is configured in Configuration in
Vim/tmp/123/111 .jsp
Now time is: <% = new java. util. Date () %>
Curl-x127.0.0.1: 8080 www.123.com/111.jsp
Now time is: Sun Jan 21 22:09:56 CST 2018
Resolution successful
Modify the port number in this file
Vim resin. properties
Nginx proxy resin
Vim/usr/local/nginx/conf/nginx. conf
Add before the last}
Include vhosts/*. conf;
Virtual Host Configuration
Vim/usr/local/nginx/conf/vhosts/proxy. conf
Server {
Server_name www.123.com;
Location /{
Proxy_passhttp: // localhost: 8080 /;
Proxy_set_header Host $ host;
Proxy_set_header X-Real-IP $ remote_addr;
Proxy_set_headerX-Forwarded-For $ proxy_add_x_forwarded_for;
}
}
/Usr/local/nginx/sbin/nginx-t
/Etc/init. d/nginx restart
Restart nginx and enter www.123.com/111.jsp on the webpage.
Port 80 of nginx proxy is successfully used.