Hello! I am trying to raise the site on joomla using nginx + php5-fpm. Only the main page works for me, 404 errors fall on the rest. These pages are generated with the .html extension and I cannot figure out how to write a rule for them in the nginx config file. Config took from here https://wiki.debian.org/ru/nginx/nginx+php-fpm Please give a hint

server{ server_name acbr.loc; access_log /var/log/nginx/acbr.access.log; error_log /var/log/nginx/acbr.error.log; root /home/oleshko/design/acbr; location ~ \.php$ { try_files $uri = 404; include fastcgi_params; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } # порядок индексов location / { index index.php index.html index.htm; } } 

An example of a URL for which a 404 error will appear : http: //acbr.loc/reports/april.html

  • docs.joomla.org/Nginx - aleksandr barakin
  • Dude, I love you! - Igor Oleshko
  • If possible, publish the solution found in response to your question . I am sure it will help many of your colleagues in the future. - Nicolas Chabanovsky
  • @alexanderbarakin here the author did not leave an answer, but the problem seemed to be solved. Perhaps you can give at least a short answer? - Nick Volynkin

1 answer 1

These pages are generated with the .html extension and I cannot figure out how to write a rule for them in the nginx config

joomla developers recommend URLs that refer to dynamically generated pages to be passed to the /index.php script for processing:

 location / { try_files $uri $uri/ /index.php?$args; }