O
O
Oleg Pavlov2014-11-27 23:22:00
PHP
Oleg Pavlov, 2014-11-27 23:22:00

How to set up a single entry point in the nginx - php-fpm bundle?

Hello!
Actually, you need a single entry point for one script on the site - that is, not to redirect the entire site to one file, but only for one script in a separate folder.
And here if everything is simple with Apache, then I can’t understand how to implement the same for nginx.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
Ilya Evseev, 2014-11-28
@onpavlov

More or less like this:

location = /path/to/script {
    rewrite ^(.*)$  /path/to/another/script  break;
}

E
Evervess, 2014-11-27
@Evervess

If everything is simple with Apache, then here is a converter for .htaccess for you
Write rewrite for Apache, you get for nginx

S
Sergey, 2014-11-27
Protko @Fesor

Take the same config that does this for the entire site (for any popular framework with a single entry point) and just write the correct location.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question