S
S
Slash2018-05-07 16:47:48
Nginx
Slash, 2018-05-07 16:47:48

Why doesn't location (Migrating from Apache to Nginx) work?

Good evening!
Today I am migrating a site to Nginx for the first time. Faced with the fact that "location" does not work (I do something no). I'm fighting with two rules:

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

AND:
location ~* \.(jpg|jpeg|gif|png|ico|js|css|html)$ {
      expires 7d;
    }

And not one of them wants to work for me... Site on https.
Tell me, please, what am I doing wrong?
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Skibin, 2018-05-07
@Slash-Zn

I'll post it as an answer

https://nginxconfig.io/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question