N
N
Nastradamus2011-08-25 17:02:43
Nginx
Nastradamus, 2011-08-25 17:02:43

How to configure location in nginx to give all static except php?

Hello!
Tired of specifying a location like:

location ~* \.(jpeg|jpg|gif|png|css|swf|avi|js|pdf|txt|tar|zip|rar|html|exe|ico|png)$

, and then think about whether I forgot which extension.
Is it possible to make it so that all files are given to Nginx by default, and Apache processes only .php?
Or is it against Nginx principles?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
VBart, 2011-08-25
@Nastradamus

location ~* \.php$ {
   here proxy pass
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question