- 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"; } }
推薦閱讀
- Visual C++串口通信開發(fā)入門與編程實(shí)踐
- 網(wǎng)頁設(shè)計(jì)與制作教程(HTML+CSS+JavaScript)(第2版)
- Python金融數(shù)據(jù)分析
- Java軟件開發(fā)基礎(chǔ)
- AutoCAD VBA參數(shù)化繪圖程序開發(fā)與實(shí)戰(zhàn)編碼
- 詳解MATLAB圖形繪制技術(shù)
- Java Web應(yīng)用開發(fā)項(xiàng)目教程
- Java 9 Programming By Example
- Three.js權(quán)威指南:在網(wǎng)頁上創(chuàng)建3D圖形和動(dòng)畫的方法與實(shí)踐(原書第4版)
- INSTANT Premium Drupal Themes
- HTML5程序開發(fā)范例寶典
- 3D Printing Designs:Design an SD Card Holder
- Eclipse開發(fā)(學(xué)習(xí)筆記)
- VBA Automation for Excel 2019 Cookbook
- Hands-On GUI Application Development in Go