官术网_书友最值得收藏!

  • NGINX Cookbook
  • Tim Butler
  • 84字
  • 2021-07-03 00:04:27

How to do it...

To use Joomla with NGINX, we need a simple NGINX configuration file. This is a very basic PHP-FPM configuration with no changes required:

server { 
    listen       80; 
    server_name  joomla.nginxcookbook.com; 
 
    access_log  /var/log/nginx/joomla.access.log  combined; 
    index index.php; 
 
    root   /var/www/html/; 
 
    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; } location ^~ /cache/ { deny all; } }

To enable clean URLs, you also need to ensure that URL rewriting is enabled:

主站蜘蛛池模板: 安化县| 桂平市| 宁明县| 阿勒泰市| 苏尼特左旗| 平阳县| 广宗县| 班玛县| 合作市| 宜昌市| 南昌市| 皋兰县| 恩平市| 昌黎县| 南部县| 慈溪市| 镇安县| 淮安市| 桃园县| 句容市| 榆林市| 胶州市| 多伦县| 合山市| 屏山县| 红桥区| 霍州市| 青冈县| 冕宁县| 桃源县| 咸丰县| 麟游县| 个旧市| 六枝特区| 通海县| 安仁县| 沂水县| 洛隆县| 韶关市| 五河县| 南投县|