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

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:

主站蜘蛛池模板: 威远县| 青神县| 鄄城县| 冷水江市| 江源县| 晋州市| 库尔勒市| 湘西| 元朗区| 海原县| 绩溪县| 保德县| 剑阁县| 凤城市| 玛沁县| 新宁县| 苏尼特左旗| 黑山县| 贺州市| 二连浩特市| 珠海市| 南木林县| 永定县| 白玉县| 和顺县| 江油市| 新龙县| 额敏县| 穆棱市| 龙口市| 连州市| 白玉县| 和平县| 余庆县| 台前县| 洛隆县| 大邑县| 读书| 繁峙县| 铁岭县| 萍乡市|