Commit 3141310e authored by Terence Lee's avatar Terence Lee

custom error pages

parent 32a44de4
......@@ -21,6 +21,7 @@ class NginxConfig
json["routes"] ||= {}
json["routes"] = Hash[json["routes"].map { |route, target| [to_regex(route), target] }]
json["redirects"] ||= {}
json["error_page"] ||= nil
json.each do |key, value|
self.class.send(:define_method, key) { value }
end
......
......@@ -31,6 +31,9 @@ http {
listen <%= port %>;
keepalive_timeout 5;
root <%= root %>;
<% if error_page %>
error_page 404 500 /<%= error_page %>;
<% end %>
<% if clean_urls %>
location / {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment