deploy_saleor/resources/saleor/server_block

36 lines
728 B
Text
Raw Normal View History

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