Last active
August 29, 2015 14:02
-
-
Save nomaster/3d7d6d860571ac6199cc to your computer and use it in GitHub Desktop.
Nginx configuration for X-accel
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
http { | |
server { | |
listen 80; | |
server_name example.com; | |
location / { | |
rewrite ^/download/(.*) /sendfile.php?path=$1 last; | |
} | |
location /files { | |
root /var/www; | |
internal; # nothing served, except for x-accel-redirect! | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment