Created
August 17, 2011 08:45
-
-
Save chanmix51/1151113 to your computer and use it in GitHub Desktop.
nginx vhost conf silex & symfony
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name server.mydomain.net | |
root /var/www/app/web; | |
index index.php; | |
location ~ \.php$ { | |
fastcgi_pass 127.0.0.1:9000; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
} | |
location / { | |
if (-f $request_filename) { | |
expires max; | |
break; | |
} | |
rewrite ^(.*) /index.php last; | |
} | |
} |
what about the static content in /web folder? (js, css, image files and so on)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To avoid the IP stack usage, you can use an Unix socket instead :
Here is the corresponding listen directive in your PHP-FPM pool's config :