deploy_saleor/resources/saleor/server_block
Vague Rabbit 9de27a03a0 ^
2021-02-05 12:39:20 -08:00

36 lines
No EOL
725 B
Text

# the upstream component nginx needs to connect to
upstream django {
server unix://{hd}/run/saleor.sock;
}
# configuration of the server
server {
listen 80;
server_name {host} www.{host};
charset utf-8;
# max upload size
client_max_body_size 75M;
# Django media and static files
location {media} {
alias /var/www/{host}{media};
}
location {static} {
alias /var/www/{host}{static};
}
# Send all non-media requests to the Django server.
location / {
uwsgi_pass django;
include {hd}/saleor/uwsgi_params;
}
location /graphql/ {
proxy_pass https://{api_host}:{api_port};
}
{dashboard-location}
}