Created
December 14, 2015 05:11
-
-
Save jasonmccallister/2d0dbf9db0f396470545 to your computer and use it in GitHub Desktop.
Craft Heroku Nginx Config
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
server { | |
http { | |
location / { | |
# try to serve file directly, fallback to rewrite | |
try_files $uri @rewriteapp; | |
} | |
location @rewriteapp { | |
# rewrite all to index.php | |
rewrite ^(.*)$ /index.php?p=$1 last; | |
} | |
location ~ ^/(index)\.php(/|$) { | |
client_max_body_size 20M; | |
fastcgi_pass heroku-fcgi; | |
fastcgi_split_path_info ^(.+\.php)(/.*)$; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_param HTTPS on; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment