Answer the question
In order to leave comments, you need to log in
(Nginx + Apache) + Zend Framework: Unexpected index.php in framework generated links?
Given : CentOS 6.4
with installed mainline nginx 1.5.2
apache httpd 2.2.25
(in the company with zend-server-php-5.4
) Nginx
with the help of try_files
proxying non-static requests to Apache, everything is fine.
Problem : An application based on Zend Framework substitutes in its routes at the beginning /index.php
as the base path!
Example:
http://some.host/path/doc?var=val
http://some.host/index.php/path/doc?var=val
index.php
from the path, or variables, proxied to Apache through the config Nginx
(read, without interfering with the framework code)? index
, but this leads to an error 403
about the impossibility of viewing the directory listing. index
as error page . But still I ask for help in finding a competent solution! 403
error_page 403 @namedlocation;<br>
Answer the question
In order to leave comments, you need to log in
I’ll be the captain - remove the Apache, phpfpm is excellent and wildly just clinging to the nginx.
but in fact - you most likely have a redirect set to index.php, i.e. apache comes with url from index.php
Everything turned out to be very trivial and simple: the option was inherited from the global configuration index
, which led to the automatic addition of index.php to the proxied path. The problem is solved by removing the option index
in the host/global configuration Nginx
!
I was delighted early, so I get a 403 error when accessing the root of the site.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question