server {
listen 80;
server_name goframe.org;
access_log /var/log/gf-app-access.log;
error_log /var/log/gf-app-error.log;
location ~ .*\.(gif|jpg|jpeg|png|js|css|eot|ttf|woff|svg|otf)$ {
access_log off;
expires 1d;
root /var/www/gf-app/public;
try_files $uri @backend;
}
location / {
try_files $uri @backend;
}
location @backend {
proxy_pass http://127.0.0.1:8199;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}