Find the resin.xml configuration file and add cluster nodes
;web-app id="/test" document-directory="/data/service/test" archive-path="/data/jenkins/Test.war" redeploy-mode="automatic"/>
"
id Project access path
document-directory Project package war decompression path
archive-path Project war package path
stdout-log path log path
Configuring and starting resin, you can access the test project http:// (linuxIP address): 8095 (port number set above )/test project name http://localhost:8095/test
If we want to access this project without entering the port number, we can use nginx reverse proxy to achieve this. In Configure nginx below to reverse proxy
Find the nginx.conf configuration file to modify the configuration file
increase the upstream test {
server 127.0.0.1:8095; }
Define location
proxy_pass http://test; Page access path
proxy_redirect default; proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded -Host $server_name; Client_max_body_size 80m;
In these two places
start nginx and enter http://localhost/test
in the browser. If you can access it normally, it means that the nginx proxy has been configured successfully.
Copyright Statement: This article is an original article by the blogger and may not be reproduced without the blogger's permission.
The above introduces the configuration of resin+nginx under Linux, including the relevant aspects. I hope it will be helpful to friends who are interested in PHP tutorials.