- NGINX Cookbook
- Tim Butler
- 118字
- 2021-07-03 00:04:30
How it works...
There are a number of directives which aren't seen elsewhere because this recipe uses a specific Passenger module. In the core NGINX configuration file, we set the generic Passenger variables to use the correct Ruby version as well as the user which will run the Passenger server.
In our server block directive, we point Passenger to our demo Rails instance and enable Passenger for the server instance. There's also a basic assets location block directive, so that NGINX will process the static media natively.
Lastly, we call passenger_pre_start to automatically start the Passenger application server when NGINX starts. This saves you having to start it separately, as is the case for most other application servers.
推薦閱讀
- 精通Nginx(第2版)
- Microsoft Exchange Server PowerShell Cookbook(Third Edition)
- Java EE 6 企業級應用開發教程
- 深度學習經典案例解析:基于MATLAB
- Rust Cookbook
- JavaScript by Example
- Mastering KnockoutJS
- Java Web程序設計任務教程
- Getting Started with Gulp
- C/C++程序員面試指南
- 響應式Web設計:HTML5和CSS3實戰(第2版)
- Fastdata Processing with Spark
- Magento 2 Beginners Guide
- Mastering Concurrency in Python
- WebStorm Essentials