deploy_saleor/resources/saleor/server_block

32 lines
631 B
Text
Raw Normal View History

2021-01-29 01:28:49 +00:00
# the upstream component nginx needs to connect to
upstream django {
2021-02-05 20:39:20 +00:00
server unix://{hd}/run/saleor.sock;
2021-01-29 01:28:49 +00:00
}
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;
}
2021-02-06 02:47:14 +00:00
{dl}
2021-02-05 02:11:19 +00:00
2021-01-29 01:28:49 +00:00
}