-
-
Save eduardosacra/f9ba309f9d8acbde7c5e to your computer and use it in GitHub Desktop.
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; | |
index index.php; | |
root /var/www/; | |
charset utf8; | |
location / { | |
gzip on; | |
try_files $uri/index.php $uri /index.php; | |
if (!-f $request_filename) { | |
rewrite (.*) /index.php; | |
} | |
} | |
location /admin { | |
index index.php; | |
} | |
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ { | |
expires 30d; | |
gzip on; | |
} | |
location ~ .*\.(js|css)?$ { | |
expires 1h; | |
} | |
# php fastcgi setting | |
location ~ \.php$ { | |
fastcgi_pass 127.0.0.1:9000; | |
fastcgi_index index.php; | |
include /etc/nginx/fastcgi_params; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment