Last active
December 10, 2015 20:28
-
-
Save rxaviers/4488100 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; | |
server_name dev.images.jqueryui.com; | |
access_log /var/log/nginx/image_jqueryui_access.log; | |
error_log /var/log/nginx/image_jqueryui_error.log; | |
root /tmp/image.jqueryui.com; | |
location / { | |
index index.php; | |
expires 30d; # Assume all files are cachable | |
} | |
location /\. { # Disable .htaccess and other hidden files | |
return 404; | |
} | |
# These locations would be hidden by .htaccess normally | |
location ^~ /app/ { deny all; } | |
location ^~ /cache/ { deny all; } | |
location ^~ /icons/ { deny all; } | |
location ^~ /textures/ { deny all; } | |
location ^~ /themeGallery/ { deny all; } | |
location ~ \.php$ { # Execute PHP scripts | |
if (!-e $request_filename) { rewrite / /index.php last; } # Catch 404s that try_files miss | |
expires off; # Do not cache dynamic content | |
include /etc/nginx/fastcgi_params; | |
fastcgi_param HTTPS $fastcgi_https; | |
fastcgi_intercept_errors on; | |
fastcgi_pass 127.0.0.1:9001; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment