- NGINX Cookbook
- Tim Butler
- 112字
- 2021-07-03 00:04:32
How to do it...
As Meteor has an inbuilt server, we need to ensure this is running first:
meteor run
This will start the Meteor proxy, start MongoDB, and then build the application. By default, it'll listen on port 3000 of your localhost. For a production system, you'll want to implement a proper init script to start this when the server boots. Third-party packages such as Meteor-Up can make this easy to do.
Like the previous recipes, we're using a separate NGINX server configuration file, for example, /etc/nginx/conf.d/meteor.conf:
server { listen 80; server_name meteorapp.nginxcookbook.com; access_log /var/log/nginx/meteor-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"; } }
推薦閱讀
- Unreal Engine Physics Essentials
- 自己動手寫搜索引擎
- JavaFX Essentials
- 碼上行動:零基礎(chǔ)學(xué)會Python編程(ChatGPT版)
- 趣學(xué)Python算法100例
- Django:Web Development with Python
- 64位匯編語言的編程藝術(shù)
- Ray分布式機(jī)器學(xué)習(xí):利用Ray進(jìn)行大模型的數(shù)據(jù)處理、訓(xùn)練、推理和部署
- Mastering LibGDX Game Development
- 軟件項目管理實用教程
- Scala編程實戰(zhàn)(原書第2版)
- Machine Learning for OpenCV
- Isomorphic JavaScript Web Development
- C語言程序設(shè)計教程
- 小小的Python編程故事