mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 11:36:44 +00:00
Update nginx conf files
This commit is contained in:
parent
7c126ed712
commit
85c8b94d80
@ -7,9 +7,9 @@ version: "3.8"
|
|||||||
# - Serves media and static content directly from Django webserver
|
# - Serves media and static content directly from Django webserver
|
||||||
|
|
||||||
# IMPORANT NOTE:
|
# IMPORANT NOTE:
|
||||||
# The InvenTree docker image does not clone source code from git.
|
# The InvenTree development image does not clone source code from git.
|
||||||
# Instead, you must specify *where* the source code is located,
|
# Instead, you must specify *where* the source code is located, (on your local machine).
|
||||||
# (on your local machine).
|
# The default setup in this file should work straight out of the box, without modification
|
||||||
# The django server will auto-detect any code changes and reload the server.
|
# The django server will auto-detect any code changes and reload the server.
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
@ -4,24 +4,29 @@ server {
|
|||||||
# Listen for connection on (internal) port 80
|
# Listen for connection on (internal) port 80
|
||||||
listen 80;
|
listen 80;
|
||||||
|
|
||||||
location / {
|
real_ip_header proxy_protocol;
|
||||||
# Change 'inventree-server' to the name of the inventree server container,
|
|
||||||
# and '8000' to the INVENTREE_WEB_PORT (if not default)
|
|
||||||
proxy_pass http://inventree-server:8000;
|
|
||||||
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
location / {
|
||||||
proxy_set_header Host $http_host;
|
|
||||||
|
proxy_set_header Host $http_host;
|
||||||
|
proxy_set_header X-Forwarded-By $server_addr:$server_port;
|
||||||
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header CLIENT_IP $remote_addr;
|
||||||
|
|
||||||
|
proxy_pass_request_headers on;
|
||||||
|
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
|
|
||||||
client_max_body_size 100M;
|
client_max_body_size 100M;
|
||||||
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
|
|
||||||
proxy_buffering off;
|
proxy_buffering off;
|
||||||
proxy_request_buffering off;
|
proxy_request_buffering off;
|
||||||
|
|
||||||
|
# Change 'inventree-server' to the name of the inventree server container,
|
||||||
|
# and '8000' to the INVENTREE_WEB_PORT (if not default)
|
||||||
|
proxy_pass http://inventree-server:8000;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Redirect any requests for static files
|
# Redirect any requests for static files
|
||||||
|
@ -4,24 +4,30 @@ server {
|
|||||||
# Listen for connection on (internal) port 80
|
# Listen for connection on (internal) port 80
|
||||||
listen 80;
|
listen 80;
|
||||||
|
|
||||||
location / {
|
real_ip_header proxy_protocol;
|
||||||
# Change 'inventree-dev-server' to the name of the inventree server container,
|
|
||||||
# and '8000' to the INVENTREE_WEB_PORT (if not default)
|
|
||||||
proxy_pass http://inventree-dev-server:8000;
|
|
||||||
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
location / {
|
||||||
proxy_set_header Host $http_host;
|
|
||||||
|
proxy_set_header Host $http_host;
|
||||||
|
proxy_set_header X-Forwarded-By $server_addr:$server_port;
|
||||||
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header CLIENT_IP $remote_addr;
|
||||||
|
|
||||||
|
proxy_pass_request_headers on;
|
||||||
|
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
|
|
||||||
client_max_body_size 100M;
|
client_max_body_size 100M;
|
||||||
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
|
|
||||||
proxy_buffering off;
|
proxy_buffering off;
|
||||||
proxy_request_buffering off;
|
proxy_request_buffering off;
|
||||||
|
|
||||||
|
# Change 'inventree-dev-server' to the name of the inventree server container,
|
||||||
|
# and '8000' to the INVENTREE_WEB_PORT (if not default)
|
||||||
|
proxy_pass http://inventree-dev-server:8000;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Redirect any requests for static files
|
# Redirect any requests for static files
|
||||||
|
Loading…
x
Reference in New Issue
Block a user