Skip to content

Instantly share code, notes, and snippets.

@andreibosco
Last active August 29, 2015 14:00
Show Gist options
  • Select an option

  • Save andreibosco/11377142 to your computer and use it in GitHub Desktop.

Select an option

Save andreibosco/11377142 to your computer and use it in GitHub Desktop.
EDX - nginx
# EDX LMS
server {
listen 80;
server_name edx-api.cloudapp.net;
#autoindex on;
#autoindex_exact_size off;
gzip on;
gzip_proxied any;
gzip_disable "MSIE [1-6]\.";
gzip_min_length 1000;
gzip_vary on;
access_log /home/azureuser/apps/edx/log/nginx-access-edx.log;
error_log /home/azureuser/apps/edx/log/nginx-error-edx.log;
location /static/uploads/ {
expires 3d;
alias /home/azureuser/apps/edx/uploads/;
}
location /static/ {
expires 3d;
alias /home/azureuser/apps/edx/staticfiles/;
}
location / {
proxy_pass http://127.0.0.1:8000;
}
}
# EDX CMS "studio"
server {
listen 81;
server_name edx-api.cloudapp.net;
#autoindex on;
#autoindex_exact_size off;
gzip on;
gzip_proxied any;
gzip_disable "MSIE [1-6]\.";
gzip_min_length 1000;
gzip_vary on;
access_log /home/azureuser/apps/edx/log/nginx-access-edxstudio.log;
error_log /home/azureuser/apps/edx/log/nginx-error-edxstudio.log;
location /static/uploads/ {
expires 3d;
alias /home/azureuser/apps/edx/uploads/;
}
location /static/ {
expires 3d;
alias /home/azureuser/apps/edx/staticfiles/;
}
location / {
proxy_pass http://127.0.0.1:8001;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment