@@ -23,38 +23,46 @@ server {
23
23
rewrite ^/(.*)$ /app.php/$1;
24
24
}
25
25
26
- # Uncomment only if you're *not* using LiipImagineBundle or similar image generation tool
27
- # This context will mess with it and cache 404 for not yet generated images
28
- # location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
29
- # expires 18h;
30
- # add_header Cache-Control "public, must-revalidate, proxy-revalidate";
31
- # }
26
+ location ~ ^/(app_dev|app)\.php(.*?)\.(?:ico|gif|jpe?g|png)$ {
27
+ expires 18h;
28
+ add_header Cache-Control "public, must-revalidate, proxy-revalidate";
29
+ access_log off;
30
+
31
+ ## uncomment redirect when using LiipImagineBundle!
32
+ ## see this for reference http://stackoverflow.com/questions/16925886/nginx-accesslog-for-liipimaginebundle-images
33
+ # include fastcgi_params;
34
+ # fastcgi_pass 127.0.0.1:9000;
35
+ ## fastcgi_pass unix:/tmp/php5-fpm.sock;
36
+ # fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
37
+ # fastcgi_param HTTPS off;
38
+ }
32
39
33
40
location ~* \.(?:css|js)$ {
34
- # You need to recompile nginx to use gzip_static
35
- # See http://wiki.nginx.org/HttpGzipStaticModule
36
- # gzip_static on;
41
+ # You need to recompile nginx to use gzip_static
42
+ # See http://wiki.nginx.org/HttpGzipStaticModule
43
+ # gzip_static on;
37
44
38
45
expires 18h;
39
- add_header Cache-Control "publi , must-revalidate, proxy-revalidate";
46
+ add_header Cache-Control "public , must-revalidate, proxy-revalidate";
40
47
}
41
48
42
49
location ~ \.php {
43
- limit_conn default 30;
50
+ # limit_conn default 30;
44
51
45
- # Messes up with SEF URIs, not sure it's even needed
46
- # try_files $uri =404;
52
+ # Messes up with SEF URIs, not sure it's even needed
53
+ # try_files $uri =404;
47
54
48
55
fastcgi_index app.php;
49
56
fastcgi_pass 127.0.0.1:9000;
57
+ # fastcgi_pass unix:/tmp/php5-fpm.sock;
50
58
51
59
include fastcgi_params;
52
60
fastcgi_split_path_info ^(.+\.php)(/.+)$;
53
61
fastcgi_param PATH_INFO $fastcgi_path_info;
54
62
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
55
63
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
56
- fastcgi_param SERVER_PORT 80;
57
- fastcgi_param SERVER_NAME example.com;
64
+ # fastcgi_param SERVER_PORT 80;
65
+ # fastcgi_param SERVER_NAME example.com;
58
66
}
59
67
60
68
location ~ /\.ht {
0 commit comments