|
| 1 | +## |
| 2 | +# You should look at the following URL's in order to grasp a solid understanding |
| 3 | +# of Nginx configuration files in order to fully unleash the power of Nginx. |
| 4 | +# https://www.nginx.com/resources/wiki/start/ |
| 5 | +# https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/ |
| 6 | +# https://wiki.debian.org/Nginx/DirectoryStructure |
| 7 | +# |
| 8 | +# In most cases, administrators will remove this file from sites-enabled/ and |
| 9 | +# leave it as reference inside of sites-available where it will continue to be |
| 10 | +# updated by the nginx packaging team. |
| 11 | +# |
| 12 | +# This file will automatically load configuration files provided by other |
| 13 | +# applications, such as Drupal or Wordpress. These applications will be made |
| 14 | +# available underneath a path with that package name, such as /drupal8. |
| 15 | +# |
| 16 | +# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples. |
| 17 | +## |
| 18 | + |
| 19 | +# OCS server configuration |
| 20 | +# |
| 21 | +server { |
| 22 | + listen ${LISTEN_PORT} ${PORT_TYPE} default_server; |
| 23 | + |
| 24 | + ssl_certificate /etc/nginx/certs/${SSL_CERT}; |
| 25 | + ssl_certificate_key /etc/nginx/certs/${SSL_KEY}; |
| 26 | + |
| 27 | + location / { |
| 28 | + proxy_redirect off; |
| 29 | + proxy_set_header X-Forwarded-Proto $scheme; |
| 30 | + proxy_set_header Host $http_host; |
| 31 | + proxy_set_header X-Real-IP $remote_addr; |
| 32 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| 33 | + proxy_set_header X-Frame-Options SAMEORIGIN; |
| 34 | + proxy_pass http://ocsapp; |
| 35 | + } |
| 36 | + |
| 37 | +# location /ocsapi { |
| 38 | +# auth_basic "OCS Api area"; |
| 39 | +# auth_basic_user_file /etc/nginx/auth/${API_AUTH_FILE}; |
| 40 | +# proxy_pass http://ocsapp/ocsapi; |
| 41 | +# } |
| 42 | + |
| 43 | + location /download { |
| 44 | + proxy_read_timeout ${READ_TIMEOUT}; |
| 45 | + proxy_connect_timeout ${CONNECT_TIMEOUT}; |
| 46 | + proxy_send_timeout ${SEND_TIMEOUT}; |
| 47 | + client_max_body_size ${MAX_BODY_SIZE}; |
| 48 | + proxy_pass http://ocsapp/download; |
| 49 | + } |
| 50 | +} |
0 commit comments