diff --git a/public/nginx.conf b/public/nginx.conf index ceb5d15..be6d5b8 100644 --- a/public/nginx.conf +++ b/public/nginx.conf @@ -4,13 +4,13 @@ worker_processes 1; daemon off; -error_log <%= ENV["APP_ROOT"] %>/nginx/logs/error.log; +error_log ((APP_ROOT))/nginx/logs/error.log; events { worker_connections 1024; } http { charset utf-8; log_format cloudfoundry '$http_x_forwarded_for - $http_referer - [$time_local] "$request" $status $body_bytes_sent'; - access_log <%= ENV["APP_ROOT"] %>/nginx/logs/access.log cloudfoundry; + access_log ((APP_ROOT))/nginx/logs/access.log cloudfoundry; default_type application/octet-stream; include mime.types; sendfile on; @@ -31,25 +31,13 @@ http { server_tokens off; server { - listen <%= ENV["PORT"] %>; + listen ((PORT)); server_name localhost; add_header X-Frame-Options SAMEORIGIN; location / { - root <%= ENV["APP_ROOT"] %>/public; + root ((APP_ROOT))/public; index index.html index.htm Default.htm; - <% if ENV["FORCE_HTTPS"] %> - if ($http_x_forwarded_proto != "https") { - return 301 https://$host$request_uri; - } - <% end %> } - - <% unless File.exists?(File.join(ENV["APP_ROOT"], "nginx/conf/.enable_dotfiles")) %> - location ~ /\. { - deny all; - return 404; - } - <% end %> } }