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

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:

主站蜘蛛池模板: 武穴市| 长沙县| 泸西县| 黄龙县| 昆山市| 固原市| 洛川县| 库伦旗| 蕉岭县| 林甸县| 德江县| 武夷山市| 绥中县| 吴堡县| 松阳县| 晴隆县| 澜沧| 隆子县| 海城市| 建瓯市| 邻水| 健康| 永寿县| 紫云| 家居| 德惠市| 阿鲁科尔沁旗| 镇远县| 都匀市| 新兴县| 宣汉县| 孝昌县| 汝南县| 舟曲县| 贡嘎县| 祁东县| 宁海县| 雅江县| 巨野县| 尚志市| 静安区|