symfony2 767 Bytes
Newer Older
mikka's avatar
mikka committed
1
2
3
4
5
6
7
8
9
10
11
server {
    root /home/{user}/www/{vhost}/web;
    index app_dev.php;

    server_name {vhost};
    client_max_body_size 10M;
    
    error_log /var/log/nginx/{vhost}.error.log;
	access_log /var/log/nginx/{vhost}.access.log;
    
    location / {
12
        try_files $uri $uri/ /app_dev.php$uri /app_dev.php$is_args$args;
mikka's avatar
mikka committed
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
    }

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:{pool_port}
    location ~ ^/(app|app_dev|check)\.php(/|$) {
        fastcgi_pass   127.0.0.1:{pool_port};
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
        fastcgi_param  HTTPS              off;
    }

    location ~ /\.ht {
        deny all;
    }
}