- NGINX Cookbook
- Tim Butler
- 89字
- 2021-07-03 00:04:32
How to do it...
We'll create a separate NGINX configuration file with the server block in it, as follows:
server { listen 80; server_name beegodemo.nginxcookbook.com; access_log /var/log/nginx/beegodemo-access.log combined; location = /favicon.ico { access_log off; log_not_found off; } location / { proxy_pass http://127.0.0.1:8080; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } }
By default, a Beego application will listen on the localhost to port 8080. We simply proxy all connections though. Like the Express recipe, we also set the proxy headers to allow WebSockets to pass through as well.
推薦閱讀
- SQL Server 從入門到項目實踐(超值版)
- 流量的秘密:Google Analytics網站分析與優化技巧(第2版)
- Advanced Machine Learning with Python
- GeoServer Cookbook
- Python深度學習
- Visual Basic程序設計(第3版):學習指導與練習
- Web全棧工程師的自我修養
- C#開發案例精粹
- C專家編程
- Illustrator CS6設計與應用任務教程
- 計算機應用技能實訓教程
- Apache Solr PHP Integration
- SQL Server 2014 Development Essentials
- 小學生C++趣味編程從入門到精通
- Python人工智能項目實戰