- NGINX Cookbook
- Tim Butler
- 77字
- 2021-07-03 00:04:29
How to do it...
Now that we have a very simple Express application, we'll place NGINX in front of it. Although Node.js is extremely fast, NGINX is not only faster but offers far more configurability. Even with WebSockets, we're still able to proxy this through NGINX. Let's take a look at the configuration:
server { listen 80; server_name express.nginxcookbook.com; access_log /var/log/nginx/express-access.log combined; location / { proxy_pass http://127.0.0.1:3000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } }
推薦閱讀
- INSTANT Mock Testing with PowerMock
- 玩轉(zhuǎn)Scratch少兒趣味編程
- Progressive Web Apps with React
- 單片機(jī)C語言程序設(shè)計(jì)實(shí)訓(xùn)100例:基于STC8051+Proteus仿真與實(shí)戰(zhàn)
- Java Web開發(fā)之道
- Java設(shè)計(jì)模式及實(shí)踐
- Building Serverless Applications with Python
- Learning Python Design Patterns
- 可解釋機(jī)器學(xué)習(xí):模型、方法與實(shí)踐
- Python網(wǎng)絡(luò)爬蟲技術(shù)與應(yīng)用
- OpenMP核心技術(shù)指南
- Distributed Computing in Java 9
- Go語言入門經(jīng)典
- Responsive Web Design with jQuery
- JSP應(yīng)用與開發(fā)技術(shù)(第3版)