- 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; } }
推薦閱讀
- 小創客玩轉圖形化編程
- 摩登創客:與智能手機和平板電腦共舞
- AIRAndroid應用開發實戰
- MySQL數據庫管理與開發(慕課版)
- C語言程序設計實驗指導 (第2版)
- PySide 6/PyQt 6快速開發與實戰
- ArcGIS for Desktop Cookbook
- Vue.js光速入門及企業項目開發實戰
- 大數據時代的企業升級之道(全3冊)
- Clojure Web Development Essentials
- 算法訓練營:海量圖解+競賽刷題(入門篇)
- ASP.NET本質論
- HTML5+CSS+JavaScript深入學習實錄
- Scratch超人漫游記:創意程序設計:STEAM創新教育指南
- TensorFlow.NET實戰