Created
January 8, 2014 10:21
-
-
Save desarrolla2/8314651 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 8080; | |
server_name www.desarrolla2.com blog.desarrolla2.com; | |
rewrite ^(.*) http://desarrolla2.com$1 permanent; | |
} | |
server { | |
listen 8080; | |
server_name desarrolla2.com; | |
root /var/www/desarrolla2.com/current/web; | |
index app.php; | |
location / { | |
try_files $uri $uri/ /app.php?$query_string; | |
} | |
location ~ ^/media/cache { | |
try_files $uri /app.php?$query_string; | |
} | |
location ~ \.php$ { | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_index app.php; | |
include fastcgi_params; | |
fastcgi_param SERVER_PORT $http_x_forwarded_port; | |
} | |
location ~ /\.ht { | |
deny all; | |
} | |
location ~* ^.+\.(jpg|jpeg|gif|png|ico|swf|flv|woff)$ { | |
access_log off; | |
expires 30d; | |
} | |
location ~* ^.+\.(css|js)$ { | |
access_log off; | |
expires 7d; | |
} | |
gzip on; | |
gzip_vary on; | |
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript; | |
access_log /var/log/nginx/access/desarrolla2.com.log; | |
error_log /var/log/nginx/error/desarrolla2.com.log error; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment