25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

46 lines
1002 B

  1. server {
  2. listen 80 default;
  3. server_name _;
  4. access_log /data/nginx-access.log;
  5. error_log /data/nginx-error.log;
  6. root /pinry/pinry-spa/dist/;
  7. client_max_body_size 50M;
  8. add_header X-Frame-Options sameorigin always;
  9. location /static {
  10. alias /data/static;
  11. expires max;
  12. access_log off;
  13. }
  14. location /media {
  15. alias /data/static/media;
  16. expires max;
  17. access_log off;
  18. }
  19. location /api {
  20. proxy_set_header Host $host;
  21. proxy_set_header X-Real-IP $remote_addr;
  22. proxy_set_header X-Forwarded-For $remote_addr;
  23. proxy_pass http://localhost:8000;
  24. break;
  25. }
  26. location /admin {
  27. proxy_set_header Host $host;
  28. proxy_set_header X-Real-IP $remote_addr;
  29. proxy_set_header X-Forwarded-For $remote_addr;
  30. proxy_pass http://localhost:8000;
  31. break;
  32. }
  33. location / {
  34. try_files $uri $uri/ /index.html;
  35. access_log off;
  36. }
  37. }