S
S
Sergey2016-03-15 15:54:40
linux
Sergey, 2016-03-15 15:54:40

Nginx single entry point?

How to set up a single entry point? It is necessary to allow access only to index.php, robots.txt in the root of the site. And to files and folders located in the resourse directory, which lies at the root of the site.
There may be a problem accessing www.sait.com
Solution index index.php; after location /...

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

If get parameters are not accepted, add $args, example above

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Osher, 2016-03-15
@chelovekmuravei

Here you have configs for all occasions. :)
Almost in any there is a similar description of how to set up a bunch.
https://github.com/elasticweb/nginx-configs

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question