fork download
  1. # Nginx
  2. server {
  3. listen 80;
  4. server_name thebeauwow.me;
  5. charset utf-8;
  6. client_max_body_size 1G;
  7.  
  8. access_log /var/log/nginx/mysite.com_access.log;
  9. error_log /var/log/nginx/mysite.com_error.log;
  10.  
  11. location /static {
  12. alias /home/beauwow/The-Beau-Wow-Project-B/static/;
  13. }
  14.  
  15. location /media {
  16. alias /home/beauwow/The-Beau-Wow-Project-B/media;
  17. }
  18.  
  19. location / {
  20. proxy_set_header Host $http_host;
  21. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  22. proxy_set_header X-Forwarded-Proto $scheme;
  23. proxy_redirect off;
  24. proxy_buffering off;
  25. proxy_pass http://uvicorn;
  26. }
  27. }
  28.  
  29. upstream uvicorn {
  30. server unix:/tmp/uvicorn.sock;
  31. }
  32.  
  33.  
  34.  
  35. # supervisord.conf
  36.  
  37. ; supervisor config file
  38.  
  39. [unix_http_server]
  40. file=/var/run/supervisor.sock ; (the path to the socket file)
  41. chmod=0700 ; sockef file mode (default 0700)
  42.  
  43. [supervisord]
  44. logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
  45. pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
  46. childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP)
  47.  
  48. ; the below section must remain in the config file for RPC
  49. ; (supervisorctl/web interface) to work, additional interfaces may be
  50. ; added by defining them in separate rpcinterface: sections
  51. [rpcinterface:supervisor]
  52. supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
  53.  
  54. [supervisorctl]
  55. serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket
  56.  
  57. ; The [include] section can just contain the "files" setting. This
  58. ; setting can list multiple files (separated by whitespace or
  59. ; newlines). It can also contain wildcards. The filenames are
  60. ; interpreted as relative to this file. Included files *cannot*
  61. ; include files themselves.
  62.  
  63. [include]
  64. files = /etc/supervisor/conf.d/*.conf
  65.  
  66. [program:django]
  67. command = /home/beauwow/The-Beau-Wow-Project-BE/.venv/bin/python3.9 -m uvicorn core.asgi:application --uds /tmp/uvicorn.sock
  68. directory = /home/beauwow/The-Beau-Wow-Project-BE/
  69. stderr_logfile = /home/beauwow/The-Beau-Wow-Project-BE/log/long.err.log
  70. stdout_loffile = /home/beauwow/The-Beau-Wow-Project-BE/log/long.out.log
  71. autostart=true
  72. autorestart=true
  73.  
  74.  
Runtime error #stdin #stdout #stderr 0.01s 5444KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
./prog.sh: line 2: server: command not found
./prog.sh: line 3: listen: command not found
./prog.sh: line 4: server_name: command not found
./prog.sh: line 5: charset: command not found
./prog.sh: line 6: client_max_body_size: command not found
./prog.sh: line 8: access_log: command not found
./prog.sh: line 9: error_log: command not found
./prog.sh: line 11: location: command not found
./prog.sh: line 12: alias: /home/beauwow/The-Beau-Wow-Project-B/static/: not found
./prog.sh: line 13: syntax error near unexpected token `}'
./prog.sh: line 13: `		}'