Home > Backend Development > PHP Tutorial > Build JSP development environment under nginx jsp development framework jsp development software jsp tag opening

Build JSP development environment under nginx jsp development framework jsp development software jsp tag opening

WBOY
Release: 2016-07-29 08:50:13
Original
1333 people have browsed it

1: Overview of the JSP development environment under nginx

If you want to use JSP technology in the nginx server, you must build a JSP development environment in the nginx server

2: JDK installation

JDK — that is, javaSDK, JDK is the core of java, Including java runtime environment and java tools
, java basic class library, etc. Therefore, before setting up a JSP development environment, you must install JDK
Go to the official website to download jdk, unzip and install.
Move to the /usr/local/ directory

<code>mv  jdk1.<span>7.0_79</span>/   <span>/usr/local</span></code>
Copy after login

Rename the folder:

<code>mv  jdk1.7.0_79/   jdk</code>
Copy after login

3.3: Configure environment variables:

<code>vim /etc/profile</code>
Copy after login

Go to the end of the file:

<code>JAVA_HOME=”/usr/<span>local</span>/jdk”
CLASS_PATH=”<span>$JAVA_HOME</span>/lib:<span>$JAVA_HOME</span>/jre/lib”
PATH=”.:<span>$PATH</span>:<span>$JAVA_HOME</span>/bin”
CATALINA_HOME=”/usr/<span>local</span>/tomcat”
Export JAVA_HOME CATALINA_HOME</code>
Copy after login

Let the configuration take effect immediately:

<code><span>source</span> /etc/profile</code>
Copy after login

Verify whether jdk is installed Success:

<code>Java –<span>version</span></code>
Copy after login

3: Tomcat installation

Go to the official website to download
Unzip and install
Configure tomcat into /etc/profile:
CATALINA_HOME=”/usr/local/tomcat”

4: tomcat+nginx configuration

<code>安装好JDK和tomcat后,要把tomcat和nginx服务器之间建立关联,
</code>
Copy after login

This will enable tomcat to be used in the nginx server.
Create jsp.conf in the /usr/local/nginx/conf/ directory
jsp.conf:

<code>User nobody;
Worker_processes <span>4</span>;
Events {
    Worker_connections <span>1024</span>;
}
http {
server {
    listen <span>90</span>;
server_name <span>127.0</span><span>.0</span><span>.1</span>;
access_log logs/server1<span>.</span>access<span>.</span><span>log</span> combined;
location ~ <span>\</span><span>.</span>(jsp<span>|</span>jspx<span>|</span><span>do</span>)<span>?</span>$ {
    root /data0/www;
    index index<span>.</span>jsp index<span>.</span>jspx index<span>.</span><span>do</span>;
    proxy_set_header X<span>-Forworded</span><span>-Host</span><span>$host</span>;
    proxy_set_header X<span>-Forwarded</span><span>-Server</span><span>$host</span>;
    proxy_set_header X<span>-Forwarded</span><span>-For</span><span>$proxy_add_x_forwarded_for</span>;
    proxy_pass http:<span>//localhost:8080;</span>
}
}
}
</code>
Copy after login

Create test.jsp under tomcat’s ROOT and enter the content test a.jsp
Start tomcat

Start nginx

<code>/usr/<span>local</span>/nginx/sbin/nginx <span>-c</span> /usr/<span>local</span>/nginx/conf/jsp<span>.</span>conf</code>
Copy after login

When accessing http://192.168.1.102:90/test.jsp at this time, the tomcat server will process and parse the test.jsp page and return it to the client.
nginx配置jsp,nginx jsp,nginx插件开发,nginx模块开发,jsp开发工具,jsp开发教程,jsp开发环境,jsp网站开发,jsp开发视频,jsp微信开发,jsp的开发主流,jsp开发优势,jsp开发框架,jsp开发软件,jsp标签开
nginx配置jsp,nginx jsp,nginx插件开发,nginx模块开发,jsp开发工具,jsp开发教程,jsp开发环境,jsp网站开发,jsp开发视频,jsp微信开发,jsp的开发主流,jsp开发优势,jsp开发框架,jsp开发软件,jsp标签开

').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above introduces the establishment of JSP development environment under nginx, including jsp development and nginx content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template