V
V
Valery Selitsky2013-07-29 15:02:33
Nginx
Valery Selitsky, 2013-07-29 15:02:33

(Nginx + Apache) + Zend Framework: Unexpected index.php in framework generated links?

Given :
CentOS 6.4with installed
mainline nginx 1.5.2
apache httpd 2.2.25(in the company with zend-server-php-5.4)
Nginxwith the help of try_filesproxying non-static requests to Apache, everything is fine.
Problem : An application based on Zend Framework substitutes in its routes at the beginning /index.phpas the base path!
Example:

  • Expected:http://some.host/path/doc?var=val
  • It turns out:http://some.host/index.php/path/doc?var=val

Question :
How to remove index.phpfrom the path, or variables, proxied to Apache through the config Nginx(read, without interfering with the framework code)?
UPD :
I tried to get rid of the directive index, but this leads to an error 403about the impossibility of viewing the directory listing.
UPD 1.2 :
Found work-around: remove directive , specify named location with proxy indexas error page . But still I ask for help in finding a competent solution! 403error_page 403 @namedlocation;<br>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander A, 2013-07-29
@lordsc

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

V
Valery Selitsky, 2013-07-29
@WaveCut

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 indexin 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 question

Ask a Question

731 491 924 answers to any question