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

  • 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:

主站蜘蛛池模板: 婺源县| 盐边县| 侯马市| 宜川县| 金堂县| 嵊州市| 吕梁市| 融水| 绍兴市| 茂名市| 台南县| 舒兰市| 开封县| 阿坝县| 越西县| 泾源县| 额尔古纳市| 马关县| 陵川县| 阿拉善左旗| 崇明县| 舒城县| 梨树县| 化隆| 镇江市| 扶余县| 灵石县| 正宁县| 东平县| 应用必备| 定日县| 东阿县| 湟中县| 湖口县| 灵台县| 浦江县| 麻栗坡县| 繁昌县| 镇安县| 彭阳县| 芜湖县|