- 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; } }
推薦閱讀
- 自己動(dòng)手寫(xiě)搜索引擎
- Java面向?qū)ο筌浖_(kāi)發(fā)
- JavaScript 網(wǎng)頁(yè)編程從入門到精通 (清華社"視頻大講堂"大系·網(wǎng)絡(luò)開(kāi)發(fā)視頻大講堂)
- Java技術(shù)手冊(cè)(原書(shū)第7版)
- Learning Apache Kafka(Second Edition)
- Oracle Database 12c Security Cookbook
- Node.js全程實(shí)例
- 移動(dòng)互聯(lián)網(wǎng)軟件開(kāi)發(fā)實(shí)驗(yàn)指導(dǎo)
- 快速入門與進(jìn)階:Creo 4·0全實(shí)例精講
- 編程可以很簡(jiǎn)單
- Visual Studio Code 權(quán)威指南
- Learning Jakarta Struts 1.2: a concise and practical tutorial
- Python Machine Learning Cookbook
- RESTful Web API Design with Node.js
- 透視C#核心技術(shù):系統(tǒng)架構(gòu)及移動(dòng)端開(kāi)發(fā)