A
A
Akondr2020-01-19 09:39:45
Nginx
Akondr, 2020-01-19 09:39:45

Why doesn't SEF work on nginx server on joomla?

I am transferring a site on cms joomla to another server. I decided to abandon apache (before that it was nginx + apache). I put on nginx + php-fpm. As a result, all links on the site stopped working.
Links lead to a 404 page. If you add try_files $uri $uri/ /index.php?$args; it turns out redirecting just to the main one and that's it.
There is no CNC setting in the .htaccess file.
Can you point out what I missed?
Joomla! 3.9.8 Stable [ Amani ]
Joomla Platform 13.1.0 Stable [ Curiosity ]

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Akondr, 2020-01-19
@Akondr

I saw this topic, tried to use this configuration .. Without results. The CNC does not work. Everywhere, including in this topic, one directive try_files $uri $uri/ /index.php?$args;
but I don't quite understand its meaning in friendly urls. It turns out if there is no match for the url link or directory, there is a redirect to the main one. Well, all my non-working links instead of 404 lead with this directive to the main one. What's the point?

T
Tedeit, 2020-01-30
@Tedeit

(SEF) URLs are links to articles on your site in a human-readable form. If this option is enabled, then all links to your posts/articles from abracadabra turn into links to html pages.
In order for this to work in Joomla on a server with Nginx, you need to add the following lines to your site's configuration file and restart Nginx for the changes to take effect:
location / {
try_files $uri $uri/ /index.php? q=$request_uri;
}
Next, go to the admin panel, go to the Global Configuration section and check the box next to Search Engine Friendly (SEF) URLs

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question