- 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"; } }
推薦閱讀
- Bootstrap Site Blueprints Volume II
- Computer Vision for the Web
- LabVIEW Graphical Programming Cookbook
- 算法精粹:經典計算機科學問題的Java實現
- Rust編程從入門到實戰
- JavaScript Unlocked
- C#程序設計(慕課版)
- Clojure for Domain:specific Languages
- INSTANT MinGW Starter
- Instant RubyMotion App Development
- Python數據分析從0到1
- Windows內核編程
- SQL Server數據庫管理與開發兵書
- Python程序設計與算法基礎教程(第2版)(微課版)
- 零代碼實戰:企業級應用搭建與案例詳解