Pony.fm/vagrant/pony.fm.nginx.site.config

43 lines
1.1 KiB
Text
Raw Normal View History

2015-04-12 03:22:15 +02:00
server {
listen 80;
gzip on;
gzip_comp_level 4;
gzip_min_length 1280;
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript image/x-icon image/bmp application/json;
gzip_vary on;
server_name pony.fm.local api.pony.fm.local;
access_log /vagrant/logs/nginx-access.log;
error_log /vagrant/logs/nginx-error.log;
root /vagrant/public;
location / {
index index.html index.php;
location ~* \.(?:ttf|ttc|otf|eot|woff|font.css)$ {
add_header "Access-Control-Allow-Origin" "*";
}
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?/$1 last;
break;
}
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
expires off;
error_page 404 /index.php;
error_page 403 /403.html;
location /vagrant-files {
internal;
alias /vagrant-files/;
}
}