官术网_书友最值得收藏!

  • 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"; 
    } 
} 
主站蜘蛛池模板: 离岛区| 滕州市| 通江县| 孙吴县| 景德镇市| 桑日县| 岫岩| 磴口县| 临猗县| 防城港市| 仙游县| 彩票| 长宁县| 达日县| 龙江县| 太保市| 汝城县| 黑河市| 开化县| 宜良县| 泰兴市| 工布江达县| 乐山市| 鄂托克旗| 衢州市| 乐至县| 黔东| 会昌县| 堆龙德庆县| 拜城县| 禄丰县| 福泉市| 雷山县| 保靖县| 红安县| 衡阳市| 潮安县| 德昌县| 茂名市| 常熟市| 文山县|