-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rebuild using new nginx template config
- Loading branch information
Showing
4 changed files
with
47 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
FROM nginx:alpine | ||
MAINTAINER Jeremy T. Bouse <[email protected]> | ||
LABEL maintainer="Jeremy T. Bouse <[email protected]>" | ||
|
||
COPY nginx /etc/nginx/ | ||
COPY templates /etc/nginx/templates | ||
COPY html /usr/share/nginx/html | ||
|
||
VOLUME /etc/ssl | ||
EXPOSE 80 443 11371 | ||
|
||
CMD ["nginx", "-g", "daemon off;"] | ||
ENV SKS_HKP_PORT=11371 \ | ||
SKS_HOSTNAME=localhost \ | ||
SERVICES_DOMAIN=local |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
server { | ||
listen 80 default_server; | ||
access_log off; | ||
server_tokens off; | ||
root /usr/share/nginx/html; | ||
index index.html index.htm; | ||
|
||
rewrite ^/stats /pks/lookup?op=stats; | ||
rewrite ^/s/(.*) /pks/lookup?search=$1; | ||
rewrite ^/search/(.*) /pks/lookup?search=$1; | ||
rewrite ^/g/(.*) /pks/lookup?op=get&search=$1; | ||
rewrite ^/get/(.*) /pks/lookup?op=get&search=$1; | ||
rewrite ^/d/(.*) /pks/lookup?op=get&options=mr&search=$1; | ||
rewrite ^/download/(.*) /pks/lookup?op=get&options=mr&search=$1; | ||
|
||
location /pks { | ||
proxy_pass http://sks_backend; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
proxy_set_header X-Forwarded-Port $server_port; | ||
proxy_pass_header Server; | ||
proxy_ignore_client_abort on; | ||
proxy_intercept_errors off; | ||
client_max_body_size 8m; | ||
|
||
add_header Via "1.1 ${SKS_HOSTNAME}:$server_port (nginx)"; | ||
add_header X-Robots-Tag 'noindex, nofollow' always; | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
tcp_nopush on; | ||
tcp_nodelay on; | ||
|
||
types_hash_max_size 2048; | ||
|
||
gzip on; | ||
gzip_disable "msie6"; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
upstream sks_backend { | ||
server node0.${SERVICES_DOMAIN}:${SKS_HKP_PORT}; | ||
server node1.${SERVICES_DOMAIN}:${SKS_HKP_PORT}; | ||
} |