- NGINX Cookbook
- Tim Butler
- 78字
- 2021-07-03 00:04:24
How to do it...
This recipe is for a basic Drupal configuration, with the Drupal files located in /var/www/html.
Here's the configuration to use:
server { listen 80; server_name drupal.nginxcookbook.com; access_log /var/log/nginx/drupal.access.log combined; index index.php; root /var/www/html/; location / { try_files $uri $uri/ /index.php?$args; } location ~ (^|/)\. { return 403; } location ~ /vendor/.*\.php$ { deny all; return 404; } location ~ \.php$|^/update.php { fastcgi_pass unix:/var/run/php7.0-fpm.sock; fastcgi_split_path_info ^(.+?\.php)(|/.*)$; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME
$document_root$fastcgi_script_name; include fastcgi_params; } }
推薦閱讀
- 零基礎(chǔ)學(xué)Visual C++第3版
- Flutter開(kāi)發(fā)實(shí)戰(zhàn)詳解
- Mastering Objectoriented Python
- Power Up Your PowToon Studio Project
- Android Studio Essentials
- Manga Studio Ex 5 Cookbook
- Developing Middleware in Java EE 8
- HTML5+CSS3網(wǎng)站設(shè)計(jì)基礎(chǔ)教程
- Python面向?qū)ο缶幊蹋簶?gòu)建游戲和GUI
- PHP 7+MySQL 8動(dòng)態(tài)網(wǎng)站開(kāi)發(fā)從入門(mén)到精通(視頻教學(xué)版)
- Learning OpenStack Networking(Neutron)
- 深入淺出React和Redux
- Web前端應(yīng)用開(kāi)發(fā)技術(shù)
- 零代碼實(shí)戰(zhàn):企業(yè)級(jí)應(yīng)用搭建與案例詳解
- Visual Basic程序設(shè)計(jì)實(shí)驗(yàn)指導(dǎo)及考試指南