current position:Home>Netty configures WSS protocol access through nginx (Practical)
Netty configures WSS protocol access through nginx (Practical)
2022-04-29 08:26:23【Ocean Java】
First write a relatively simple , Write another article later Vue + springboot +netty
Netty In the Internet and Internet of things companies use a lot , The bottom floor is still websocket agreement , Many advantages , Not one by one , There are many related articles , You can search it ;
In the actual development and Application , Basically, the front and rear ends are separated , Front end deployment requires the help of nginx, So in general nginx To configure https, wss that will do , No additional configuration is required in the code , Here is nginx Profile details :
server {
#listen 80; # Here I put http and https The two requests are separated , in order to http Automatically jump to https
server_name test.baidu.com;# Change your domain name here
listen 443 ssl;
ssl_certificate /usr/local/11.pem;# Change your certificate here , The certificate is a free certificate applied by Alibaba cloud
ssl_certificate_key /usr/local/11.key;# Change your certificate here
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
location /ws {
# Here is a separate netty Service ip And port , Change to your own
proxy_pass http://172.2.2.1:8081;
proxy_set_header X-Real-IP $remote_addr;
copyright notice
author[Ocean Java],Please bring the original link to reprint, thank you.
https://en.qdmana.com/2022/119/202204290605012815.html
The sidebar is recommended
- How to configure Vue in Vue project config. JS to solve cross domain problems
- Centos6 makes nginx-1.21.6-rpm package -- the way to build a dream
- [vue2-sgg v] vuex
- [vue2-sgg vi] route Vue router guard
- [vue2-sgg VII] Vue export and deploy to nginx --- UI component library (element UI...)
- Chapter 12 Ajax
- Clion remote debugging ubutun server, blood lessons
- The latest vue-i18n international plug-in realizes language switching (with source code)
- Vue monitors watch usage
- Vue encapsulates Axios to the full version of the calling interface (code source code)
guess what you like
Watch data monitoring in Vue and detailed explanation of various attributes in watch
Vue encapsulates Axios to call interface Full Version (code source code) latest recommendation (II)
Vue encapsulates Axios to the full version of the calling interface (code source code)
Ajax usage based on JQ
Vue project optimization
Vue - form generator form code generation
Data acquisition in vuex is assigned to the local problem, and when is vuex data assigned to the local problem
The modal box component is encapsulated in Vue, and the animation effect in Vue
Swiper, the application of swiper in Vue, and various versions of swiper are applied in Vue projects
Python——ReadTimeoutError: HTTPSConnectionPool(host=‘files.pythonhosted.org‘, port=443)
Random recommended
- Lesson 3 of ROS quick start - subscriber subscriber of ROS
- A lifeless face
- Mock in Vue JS preliminary simple use
- The Java Web servlet triggers the alert box on the front end
- CSS sets the color of the small vertical bar in front of the title
- Incomplete display of CSS background image
- [front end learning notes] save the front-end related codes
- Precautions for AWS serverless design dynamodb
- AWS serverless design - apigateway
- AWS serverless design lambda
- AWS serverless design - firewall WAF
- AWS serverless design-s3
- Python repeated element determination function program
- Nginx direction agent solves cross domain Problems-2
- The foundation of JavaScript
- DOM based on JavaScript
- Javascript based BOM
- JavaScript advanced functions
- Basic summary of JavaScript advanced
- Object oriented JavaScript
- JavaScript advanced threading mechanism and event mechanism
- HTML+CSS
- Introduction to less
- CSS3 media query
- Learn about bootstrap
- JQuery learning
- Ajax case
- Ajax sends a post request
- Ajax sends get requests
- Ajax notes
- Ajax learning notes
- Relearn react (1) - recognize the life cycle
- Small problems encountered by react usereducer and Solutions
- CSS realizes the square of adaptive screen width
- Nginx + ModSecurity setup
- Bootstrap web job
- bootstrap
- Swoft 2. X Foundation (HTTP, database, redis)
- Docker actual combat case 2: nginx load balancing
- Vue basic syntax