When it comes to Nginx, you should be familiar with it. although it was a little late, its excellent performance caused many system engineers to fold and be widely used. There are many articles on the Internet that show you how to enable nginx to support jsp, asp, and so on. I would like to say this is not correct, because nginx itself is only a static server and
When it comes to Nginx, you should be familiar with it. although it was a little late, its excellent performance caused many system engineers to fold and be widely used. There are many articles on the Internet that show you how to enable nginx to support jsp, asp, and so on. I would like to say that this is not correct, because nginx itself is only a powerful tool for static server and reverse proxy, and does not support dynamic pages. The so-called support for asp, jsp, php and so on are just using nginx for reverse proxy.
We have already introduced nginx's support for php through fastcgi. here we will only introduce how to use nginx Reverse proxy tomcat and other jsp containers to serve jsp pages:
Suppose you have configured tomcat and run it on port 8080 of the local machine. open your VM configuration file and add the following lines:
Location /{
Proxy_pass http: // 127.0.0.1: 8080;
Proxy_redirect off;
Proxy_set_header Host $ host;
Proxy_set_header X-Real-IP $ remote_addr;
Proxy_set_header X-Forwarded-For $ proxy_add_x_forwarded_for;
Client_max_body_size 10 m;
Client_body_buffer_size 128 k;
Proxy_connect_timeout 30;
Proxy_send_timeout 30;
Proxy_read_timeout 30;
Proxy_buffer_size 4 k;
Proxy_buffers 4 32 k;
Proxy_busy_buffers_size 64 k;
Proxy_temp_file_write_size 64 k;
}
OK. jsp can run! Want to radial proxy IIS? Apache? -- Do it!
PS: now the official version of Nginx for Windows has been released. Therefore, the support for Asp or. net is just a matter of course. you can do it directly on one machine without relying entirely on mono.