- NGINX Cookbook
- Tim Butler
- 97字
- 2021-07-03 00:04:31
How to do it...
As Laravel is PHP based, we'll be using PHP-FPM to compile the PHP code and present to NGINX. If this is new to you, it's worth reading through Chapter 2, Common PHP Scenarios which covers some of the other PHP scenarios and the PHP-FPM configuration.
To get going, we'll create a separate virtual configuration file for Laravel:
server { listen 80; server_name laravel.nginxcookbook.com; access_log /var/log/nginx/laravel.access.log combined; index index.php; root /var/www/vhosts/laraveldemo/public; location / { try_files $uri $uri/ /index.php?$args; } location ~ \.php$ { fastcgi_pass unix:/var/run/php7.0-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME
$document_root$fastcgi_script_name; include fastcgi_params; } }
推薦閱讀
- 精通JavaScript+jQuery:100%動態網頁設計密碼
- JMeter 性能測試實戰(第2版)
- 羅克韋爾ControlLogix系統應用技術
- NativeScript for Angular Mobile Development
- C語言程序設計學習指導與習題解答
- iOS編程基礎:Swift、Xcode和Cocoa入門指南
- Haxe Game Development Essentials
- Java:High-Performance Apps with Java 9
- Python機器學習:預測分析核心算法
- INSTANT Adobe Edge Inspect Starter
- C# and .NET Core Test Driven Development
- OpenCV with Python By Example
- Arduino計算機視覺編程
- Python網絡爬蟲技術與應用
- Solutions Architect's Handbook