nginx symfony2 configuration
Pascal Christen
tronje85 at gmail.com
Mon Mar 2 16:48:31 UTC 2015
I'm trying to set up an nginx webserver for website that uses angularjs for
the frontend and symfony2 for backend stuff. I'm having trouble to set up
nginx for symfony (the angular configuration works fine). If I navigate in
browser to : http://localhost:9090/backend/app_dev.php/, I get a 404 Error
from nginx..
here is my configuration file for nginx:
----
worker_processes 1;
error_log /usr/local/etc/nginx/logs/error.log;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 200;
gzip on;
server {
listen 9090;
server_name localhost;
#angular app
location / {
root /Users/test/myproject/client/;
index index.html index.htm;
}
#symfony backend
location /backend {
alias /Users/test/myproject/backend/web;
location ~ ^/(app|app_dev)\.php(/|$) {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME
$document_root$fastcgi_script_name;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED
$document_root$fastcgi_path_info;
fastcgi_pass 127.0.0.1:9000;
fastcgi_read_timeout 50000;
}
}
}
}
----
What I'm doing wrong?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20150302/72b1c3c2/attachment.html>
More information about the nginx
mailing list