Answer the question
In order to leave comments, you need to log in
NGINX proxy_pass only PHP on Apache+PHP?
The question is just out of curiosity.
If there is Apache + PHP, a backend with NGINX and you need to return statistics, then explicitly indicate which files.
An example of this
location ~* ^.+\.(ico|bmp|jpg|jpeg|gif|png|svg|eot|ttf|woff|js|css|gz|zip|html|txt|xml)$ {
}
location ~ \.php(?:$|/) {
proxy_pass https://backend;
}
Answer the question
In order to leave comments, you need to log in
The catch is that php by itself rarely only handles *.php links.
More often, through mod_rewrite in some index.php, all site links are wrapped through mod_rewrite (that is, in htaccess). For example, in my blog php handles links /1, /2 and so on.
And transferring htaccess to the nginx config is not a very easy task for those who write nginx configs according to manuals. There are converters, of course, but they don't always work, and they usually generate garbage.
No, no, the most common practice, there are a lot of mentions, although transferring php to php-fpm is more common, but no one forbids transferring to Apache either.
without effort it is possible without the apache. php fpm and setting htaccess to nginx config
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question