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:
![](assets/862f3d5d-9b3c-4a8e-b9f2-03877fcf2b39.png)