Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [fcgi-program:asgi]
- # TCP socket used by Nginx backend upstream
- socket=tcp://localhost:8099
- # Directory where your site's project files are located
- directory=/home/alexander/registration_center/Doctor_at_home
- # Each process needs to have a separate socket file, so we use process_num
- # Make sure to update "mysite.asgi" to match your project name
- command=/home/alexander/.pyenv/versions/regenv/bin/daphne -u /run/daphne/daphne%(process_num)d.sock --fd 0 --access-log - --proxy-headers Doctor_at_home.asgi$
- # Number of processes to startup, roughly the number of CPUs you have
- numprocs=4
- # Give each process a unique name so they can be told apart
- process_name=asgi%(process_num)d
- # Automatically start and recover processes
- autostart=true
- autorestart=true
- # Choose where you want your log to go
- stdout_logfile=/home/alexander/registration_center/Doctor_at_home/log/asgi.log
- redirect_stderr=true
- Nginx
- upstream channels-backend {
- server localhost:8099;
- }
- server {
- listen 80;
- server_name 176.124.136.34;
- location = /favicon.ico { access_log off; log_not_found off; }
- location /static/ {
- root /home/alexander/registration_center/Doctor_at_home;
- }
- location /media/ {
- root /home/alexander/registration_center/Doctor_at_home;
- }
- location / {
- include proxy_params;
- proxy_pass http://0.0.0.0:8089;
- try_files $uri @proxy_to_app;
- }
- location @proxy_to_app {
- proxy_pass http://channels-backend;
- proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
- proxy_redirect off;
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Host $server_name;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement