I need to have my symfony app installed on the same domain as other webapps so I wanted it to sit in /dev/symfony_app path
I tried to use NginX Friendly PHP Framework but solutions from there do not work.
I have such nginx config and it does not work at all too. there is some problem with paths, nor root neither alias directive work for me.
location /dev/symfony_app/ {
root /home/.../public_html/web;
}
location ~ ^/dev/symfony_app/(app|app_dev|config)\.php(/|$) {
fastcgi_pass unix:/var/run/php-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $fastcgi_script_name;
fastcgi_param HTTPS off;
}
nginx error log:
request http://domain.com/dev/symfony_app/
2013/06/23 11:25:31 [error] 22549#0: *668
"/home/.../public_html/web/dev/symfony_app/index.php"
is not found (2: No such file or directory), client: *,
server: domain.com, request: "GET /dev/symfony_app/ HTTP/1.1", host: "domain.com"
request https://domain.com/dev/symfony_app
2013/06/23 11:25:37 [error] 22549#0: *668
FastCGI sent in stderr: "Primary script unknown" while
reading response header from upstream, client: *, server: domain.com,
request: "GET /dev/symfony_app HTTP/1.1", upstream:
"fastcgi://unix:/var/run/php-fpm.sock:", host: "domain.com"
request https://domain.com/dev/symfony_app/app_dev.php
2013/06/23 11:27:06 [error] 22549#0: *797
FastCGI sent in stderr: "Primary script unknown" while
reading response header from upstream, client: *, server: domain.com,
request: "GET /dev/symfony_app/app_dev.php HTTP/1.1", upstream:
"fastcgi://unix:/var/run/php-fpm.sock:", host: "domain.com"