Skip to content
This repository was archived by the owner on Jun 9, 2025. It is now read-only.

Commit 38b7747

Browse files
committed
fix formatting of sample configs
1 parent e95211d commit 38b7747

File tree

3 files changed

+42
-42
lines changed

3 files changed

+42
-42
lines changed
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
daemon off;
2-
#Heroku dynos have at least 4 cores.
2+
# Heroku dynos have at least 4 cores.
33
worker_processes <%= ENV['NGINX_WORKERS'] || 4 %>;
44

55
events {
@@ -9,9 +9,9 @@ events {
99
}
1010

1111
http {
12-
gzip on;
13-
gzip_comp_level 2;
14-
gzip_min_length 512;
12+
gzip on;
13+
gzip_comp_level 2;
14+
gzip_min_length 512;
1515

1616
server_tokens off;
1717

@@ -23,7 +23,7 @@ http {
2323
default_type application/octet-stream;
2424
sendfile on;
2525

26-
#Must read the body in 5 seconds.
26+
# Must read the body in 5 seconds.
2727
client_body_timeout 5;
2828

2929
server {
@@ -32,15 +32,15 @@ http {
3232
keepalive_timeout 5;
3333

3434
location / {
35-
36-
if ($http_x_forwarded_proto != "https") {
37-
return 301 https://$host$request_uri;
38-
}
35+
36+
if ($http_x_forwarded_proto != "https") {
37+
return 301 https://$host$request_uri;
38+
}
3939

4040
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
4141
proxy_set_header Host $http_host;
4242
proxy_redirect off;
4343
proxy_pass http://localhost:3000; #next serve listens here and receives nginx requests
4444
}
4545
}
46-
}
46+
}

config/nginx-solo-sample.conf.erb

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,36 @@ daemon off;
33
worker_processes <%= ENV['NGINX_WORKERS'] || 4 %>;
44

55
events {
6-
use epoll;
7-
accept_mutex on;
8-
worker_connections <%= ENV['NGINX_WORKER_CONNECTIONS'] || 1024 %>;
6+
use epoll;
7+
accept_mutex on;
8+
worker_connections <%= ENV['NGINX_WORKER_CONNECTIONS'] || 1024 %>;
99
}
1010

1111
http {
12-
gzip on;
13-
gzip_comp_level 2;
14-
gzip_min_length 512;
12+
gzip on;
13+
gzip_comp_level 2;
14+
gzip_min_length 512;
1515

16-
server_tokens off;
16+
server_tokens off;
1717

18-
log_format l2met 'measure#nginx.service=$request_time request_id=$http_x_request_id';
19-
access_log <%= ENV['NGINX_ACCESS_LOG_PATH'] || 'logs/nginx/access.log' %> l2met;
20-
error_log <%= ENV['NGINX_ERROR_LOG_PATH'] || 'logs/nginx/error.log' %>;
18+
log_format l2met 'measure#nginx.service=$request_time request_id=$http_x_request_id';
19+
access_log <%= ENV['NGINX_ACCESS_LOG_PATH'] || 'logs/nginx/access.log' %> l2met;
20+
error_log <%= ENV['NGINX_ERROR_LOG_PATH'] || 'logs/nginx/error.log' %>;
2121

2222

23-
include mime.types;
24-
default_type application/octet-stream;
25-
sendfile on;
23+
include mime.types;
24+
default_type application/octet-stream;
25+
sendfile on;
2626

27-
# Must read the body in 5 seconds.
28-
client_body_timeout <%= ENV['NGINX_CLIENT_BODY_TIMEOUT'] || 5 %>;
27+
# Must read the body in 5 seconds.
28+
client_body_timeout <%= ENV['NGINX_CLIENT_BODY_TIMEOUT'] || 5 %>;
2929

30-
server {
31-
listen <%= ENV["PORT"] %>;
32-
server_name _;
33-
keepalive_timeout 5;
34-
client_max_body_size <%= ENV['NGINX_CLIENT_MAX_BODY_SIZE'] || 1 %>M;
30+
server {
31+
listen <%= ENV["PORT"] %>;
32+
server_name _;
33+
keepalive_timeout 5;
34+
client_max_body_size <%= ENV['NGINX_CLIENT_MAX_BODY_SIZE'] || 1 %>M;
3535

36-
root /app/public; # path to your app
37-
}
36+
root /app/public; # path to your app
37+
}
3838
}

config/nginx.conf.erb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
daemon off;
2-
#Heroku dynos have at least 4 cores.
2+
# Heroku dynos have at least 4 cores.
33
worker_processes <%= ENV['NGINX_WORKERS'] || 4 %>;
44

55
events {
@@ -9,9 +9,9 @@ events {
99
}
1010

1111
http {
12-
gzip on;
13-
gzip_comp_level 2;
14-
gzip_min_length 512;
12+
gzip on;
13+
gzip_comp_level 2;
14+
gzip_min_length 512;
1515

1616
server_tokens off;
1717

@@ -23,23 +23,23 @@ http {
2323
default_type application/octet-stream;
2424
sendfile on;
2525

26-
#Must read the body in 5 seconds.
26+
# Must read the body in 5 seconds.
2727
client_body_timeout 5;
2828

2929
upstream app_server {
3030
server unix:/tmp/nginx.socket fail_timeout=0;
31-
}
31+
}
3232

3333
server {
3434
listen <%= ENV["PORT"] %>;
3535
server_name _;
3636
keepalive_timeout 5;
3737

3838
location / {
39-
# Uncomment this if statement to force SSL/redirect http -> https
40-
#if ($http_x_forwarded_proto != "https") {
41-
# return 301 https://$host$request_uri;
42-
#}
39+
# Uncomment this if statement to force SSL/redirect http -> https
40+
# if ($http_x_forwarded_proto != "https") {
41+
# return 301 https://$host$request_uri;
42+
# }
4343

4444
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
4545
proxy_set_header Host $http_host;

0 commit comments

Comments
 (0)