- 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; } }
推薦閱讀
- Reporting with Visual Studio and Crystal Reports
- 無代碼編程:用云表搭建企業數字化管理平臺
- 面向STEM的Scratch創新課程
- 營銷數據科學:用R和Python進行預測分析的建模技術
- Learning Informatica PowerCenter 10.x(Second Edition)
- Java程序員面試算法寶典
- SEO智慧
- 嚴密系統設計:方法、趨勢與挑戰
- bbPress Complete
- C語言程序設計
- IPython Interactive Computing and Visualization Cookbook
- 原型設計:打造成功產品的實用方法及實踐
- JavaScript高級程序設計(第4版)
- Java算法從菜鳥到達人
- C語言程序設計教程