当前位置:网站首页>Web Application & applet application deployment
Web Application & applet application deployment
2022-06-13 01:09:00 【includeSteven】
Web application & Applet application deployment
List of articles
Because the server and domain name are about to expire , And the renewal fee is too expensive , So consider buying servers and domain names again ( Take advantage of the fact that the double 11 activity server is very cheap ), Here is a record of the server application deployment 、HTTPS Settings and applet related configuration changes , In addition, all installations here are carried out through the pagoda panel , The installation process will not be repeated .
notes : The following
{}Surrounded by the contents or parameter values that need to be filled in by the reader according to the actual situation
Web Application deployment
The overall application is developed by separating the front and rear ends , Therefore, you need to start the front end and the back end respectively , The front end uses Nginx Reverse proxy and static resource forwarding , Back end adoption SpringBoot Framework development .
Web Application backend application startup
1. install jdk8.0 Environmental Science
- download jdk Installation package :
Download from official website jdk Installation package , The official website address is :https://www.oracle.com/java/technologies/downloads/#java8, The official website needs Oracle account number , Here you can search for the shared on Baidu Oracle account number , From the results, find some with a new publication date
decompression jdk Installation package , The order is :
tar -C /usr/local -zxvf {jdk file name }Set the environment variable , Need modification /etc/profile file , The specific configuration is as follows ( stay /etc/profile Add the following information to the file )
# Java Evn
export JAVA_HOME=/usr/local/jdk1.8.0
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
- Make the environment variable settings take effect immediately , The order is :
source /etc/profile - See if the environment variable works , Using the command to return the correct version information indicates success :
java -version
2. install MySQL database
Here we use the pagoda panel to install MySQL database , Create a new database in the database options , The database name 、 The username and password need to be the same as Web The configuration in the application is the same
3. install Redis database
Because this project needs to use Redis Cache database , Therefore, the pagoda panel installation is used here Redis database
4. start-up SpringBoot project
This system consists of springboot Development , So the packaged application is a jar package , It's easy to deploy , Just start the service , Here, the startup command is set as a script , as follows :
rm -rf nohup.out # Use nohup The deployment redirects the standard output to nohup.out, Of course, you can redirect the output to /dev/null, Because the author sometimes wants to view the contents of the file , So use the default redirect file directly
nohup java -jar {
jar Package file name } &
notes : The open port of the back-end service here is 8080, No need to open to the public network , Subsequent requests will pass Nginx Reverse proxy to local 8080 port
Web Application front end configuration ( use HTTPS agreement )
Nginx The installation of is not described here , If the reader needs to deploy the application to the server , Pagoda panel management can be used Linux The server , install Nginx And other software will be very convenient .
Because it is installed in the pagoda Nginx Of nginx.conf It contains /www/server/panel/vhost/nginx/*.conf Configuration in , Therefore, the following configurations can be copied to this directory
Nginx The configuration is as follows :
server {
listen 443 ssl;
# Define access domain names
server_name { domain name };
# Certificate file name
ssl_certificate {target_pem_path};
# Key file name
ssl_certificate_key {target_key_path};
#ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_prefer_server_ciphers on;
# Define access domain names
location / {
root { Site directory }
try_files $uri $uri/ /index.html;
index index.html;
}
# Here will be all /prod-api The initial connections are all reverse proxied to the local 8080 port
location /prod-api/{
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8080/;
}
location /profile/ {
proxy_pass http://localhost:8080/profile/;
}
access_log { Access log path };
error_log { Failure log path };
}
Note the need for SSL certificate , Alibaba cloud's free... Is used here ssl certificate , Links are as follows :https://yundun.console.aliyun.com/?spm=5176.12818093.ProductAndService--ali--widget-home-product-recent.dre1.5adc16d0Sa02kH&p=cas#/certExtend/free, You can apply.
Applet application deployment
Why deployment is required HTTPS agreement , This is because the third-party services on the applet side must adopt HTTPS agreement , Here, you need to fill the deployed domain name into the trusted list on the applet side , Then modify the applet side baseUrl, Just review .
边栏推荐
- 数学知识整理:极值&最值,驻点,拉格朗日乘子
- Jenkins continuous integration operation
- Stmarl: a spatio temporal multi agentreinforcement learning approach for cooperative traffic
- Breadth first search for node editor runtime traversal
- 5G工业网关在煤矿行业的应用优势
- Dynamic planning - good article link
- [003] embedded learning: creating project templates - using stm32cubemx
- Unity calls alertdialog
- Leetcode-17- letter combination of phone number (medium)
- Binary tree traversal - recursive and iterative templates
猜你喜欢

数学知识整理:极值&最值,驻点,拉格朗日乘子
![[JS component] dazzle radio box and multi box](/img/2a/00620bee312972db93e1db4313385f.jpg)
[JS component] dazzle radio box and multi box

4K sea bottom and water surface fabrication method and ocean bump displacement texture Download

Introduction to ROS from introduction to mastery (zero) tutorial

redis

What kind of experience is it to be a software test engineer in a state-owned enterprise: every day is like a war

Rasa dialogue robot helpdesk (III)

在国企做软件测试工程师是一种什么样的体验:每天过的像打仗一样

切线与切平面

Key point detection data preparation and model design based on u-net Network -- detection model of four key points of industrial components
随机推荐
[latex] insert picture
Rasa dialogue robot helpdesk (III)
Andersen global expands its business in northern Europe through cooperation agreements in Finland and Denmark
Key point detection data preparation and model design based on u-net Network -- detection model of four key points of industrial components
Leetcode-13- Roman numeral to integer (simple)
数学知识整理:极值&最值,驻点,拉格朗日乘子
Plusieurs catégories de tests logiciels sont claires à première vue
Sequence table - find main element
Loss calculation in pytorch
五篇经典好文,值得一看(2)
Alexnet implements image classification of caltech101 dataset (pytorch Implementation)
Status of the thread
Et5.0 value type generation
Five classic articles worth reading (2)
Four startup modes of kotlin collaboration
Three threads print digital demo alternately
[JS component] simulation framework
Pytorch's leafnode understanding
Minimum spanning tree problem
Quick power explanation