File tree 6 files changed +33
-30
lines changed 6 files changed +33
-30
lines changed Original file line number Diff line number Diff line change @@ -38,22 +38,10 @@ RUN apt-get -qq update && apt-get install -y \
38
38
COPY scripts/install_nodejs.sh ./
39
39
RUN ./install_nodejs.sh && rm ./install_nodejs.sh
40
40
41
- # Install Archive.org nginx w/ IP anonymization
41
+ # Install nginx
42
42
USER root
43
- RUN apt-get update && apt-get install -y --no-install-recommends nginx curl letsencrypt \
44
- # nginx-plus
45
- apt-transport-https lsb-release ca-certificates wget \
46
- # log rotation service for ol-nginx
47
- logrotate \
48
- # rsync service for pulling monthly sitemaps from ol-home0 to ol-www0
49
- rsync
50
- COPY scripts/install_openresty.sh ./
51
- RUN ./install_openresty.sh && rm ./install_openresty.sh
52
- RUN rm /usr/sbin/nginx
53
- RUN curl -L https://archive.org/download/nginx/nginx -o /usr/sbin/nginx
54
- RUN chmod +x /usr/sbin/nginx
55
- # Remove the stock nginx config file
56
- RUN rm /etc/nginx/sites-enabled/default
43
+ COPY scripts/install_nginx.sh ./
44
+ RUN ./install_nginx.sh && rm ./install_nginx.sh
57
45
58
46
RUN mkdir -p /var/log/openlibrary /var/lib/openlibrary && chown openlibrary:openlibrary /var/log/openlibrary /var/lib/openlibrary \
59
47
&& mkdir /openlibrary && chown openlibrary:openlibrary /openlibrary \
Original file line number Diff line number Diff line change @@ -14,6 +14,9 @@ server {
14
14
ssl_protocols TLSv1.2 TLSv1.3;
15
15
ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
16
16
ssl_prefer_server_ciphers on;
17
+
18
+ # Needed for logging/IP anonymization
19
+ include /olsystem/etc/nginx/logging_periodics.conf;
17
20
}
18
21
19
22
# Docker's internal load balancing ends up with unbalanced connections eventually.
Original file line number Diff line number Diff line change
1
+ # Needed for IP anonymization
2
+ load_module modules/ngx_http_js_module.so;
3
+
1
4
user www-data;
2
5
3
6
# XXX-Anand: Oct 2013
25
28
server_names_hash_bucket_size 64 ;
26
29
types_hash_bucket_size 64;
27
30
28
- log_format iacombined '$remote_addr_ipscrub $host $remote_user [$time_local ] "$request " $status $body_bytes_sent "$http_referer " "$http_user_agent " $request_time ' ;
31
+ # Logging / IP Anonymization; also need logging_periodics.conf inside a server block
32
+ include /olsystem/etc/nginx/logging.conf;
29
33
access_log /var/log/nginx/access.log iacombined;
30
34
31
35
client_max_body_size 50m ;
Original file line number Diff line number Diff line change @@ -32,6 +32,9 @@ server {
32
32
ssl_protocols TLSv1.2 TLSv1.3;
33
33
ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
34
34
ssl_prefer_server_ciphers on;
35
+
36
+ # Needed for logging/IP anonymization
37
+ include /olsystem/etc/nginx/logging_periodics.conf;
35
38
}
36
39
37
40
server {
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ apt-get update
4
+
5
+ # log rotation service for ol-nginx
6
+ # rsync service for pulling monthly sitemaps from ol-home0 to ol-www0
7
+ apt-get install -y --no-install-recommends curl \
8
+ logrotate \
9
+ rsync \
10
+ lsb-release
11
+
12
+ # Add the NGINX signing key + Repo
13
+ curl -fsSL https://nginx.org/keys/nginx_signing.key | tee /usr/share/keyrings/nginx-keyring.asc
14
+ echo " deb [signed-by=/usr/share/keyrings/nginx-keyring.asc] http://nginx.org/packages/debian $( lsb_release -cs) nginx" \
15
+ > /etc/apt/sources.list.d/nginx.list
16
+
17
+ # Install nginx and the NJS module
18
+ apt-get update
19
+ apt-get install -y --no-install-recommends nginx nginx-module-njs letsencrypt
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments