forked from pretalx/pretalx-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an nginx server to compose, to replace the one removed in v2023-1…
…. References pretalx#62
- Loading branch information
Showing
3 changed files
with
90 additions
and
4 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
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,65 @@ | ||
user www-data www-data; | ||
worker_processes 1; | ||
pid /var/run/nginx.pid; | ||
|
||
events { | ||
worker_connections 768; | ||
} | ||
|
||
http { | ||
server_tokens off; | ||
sendfile on; | ||
charset utf-8; | ||
tcp_nopush on; | ||
tcp_nodelay on; | ||
client_max_body_size 100M; | ||
|
||
log_format private '[$time_local] $host "$request" $status $body_bytes_sent'; | ||
|
||
types_hash_max_size 2048; | ||
server_names_hash_bucket_size 64; | ||
|
||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
add_header X-Content-Type-Options nosniff; | ||
|
||
access_log /var/log/nginx/access.log private; | ||
error_log /var/log/nginx/error.log; | ||
add_header Referrer-Policy same-origin; | ||
|
||
gzip on; | ||
gzip_disable "msie6"; | ||
gzip_types text/plain text/html text/css application/json application/javascript application/x-javascript text/javascript text/xml application/xml application/rss+xml application/atom+xml application/rdf+xml image/svg+xml; | ||
gzip_vary on; | ||
gzip_proxied any; | ||
gzip_comp_level 6; | ||
gzip_buffers 16 8k; | ||
|
||
include /etc/nginx/conf.d/*.conf; | ||
|
||
server { | ||
listen 80 default_server; | ||
listen [::]:80 ipv6only=on default_server; | ||
server_name _; | ||
index index.php index.html; | ||
root /var/www; | ||
|
||
location /media/ { | ||
alias /public/media/; | ||
expires 7d; | ||
access_log off; | ||
} | ||
|
||
location /static/ { | ||
alias /public/static/; | ||
access_log off; | ||
expires 365d; | ||
add_header Cache-Control "public"; | ||
} | ||
location / { | ||
proxy_pass http://pretalx:80; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header Host $http_host; | ||
} | ||
} | ||
} |
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