Hello..

*This webpage works fine:*

NGINX - FILE
server {
    listen 80;
    server_name www.ascende.com.br;

    location = /favicon.ico { access_log off; log_not_found off; }
    location /static/ {
        root /home/ascende/Site;
    }

    location / {
        include proxy_params;
        proxy_pass http://unix:/run/gunicorn.sock;
    }
}

GUNICORN SOCKET
[Unit]
Description=gunicorn socket

[Socket]
ListenStream=/run/gunicorn.sock

[Install]
WantedBy=sockets.target

GUNICORN SERVICE
[Unit]
Description=gunicorn daemon
Requires=gunicorn.socket
After=network.target

[Service]
User=ascende
Group=www-data
WorkingDirectory=/home/ascende/Site
ExecStart=/home/ascende/Site/venv/bin/gunicorn \
          --access-logfile - \
          --workers 3 \
          --bind unix:/run/gunicorn.sock \
          SiteAscende.wsgi:application

[Install]
WantedBy=multi-user.target

*This doesn't work. *

NGINX - FILE
server {
    listen 81;
    server_name www.aidacomunicacao.com.br;

    location = /favicon.ico { access_log off; log_not_found off; }
    location /static/ {
        root /home/aida/Site;
    }

    location / {
        include proxy_params;
        proxy_pass http://unix:/run/siteaida.sock;
    }
}

GUNICORN SOCKET2
[Unit]
Description=siteaida socket

[Socket]
ListenStream=/run/siteaida.sock

[Install]
WantedBy=sockets.target

GUNICORN SERVICE2
[Unit]
Description=siteaida daemon
Requires=siteaida.socket
After=network.target

[Service]
User=aida
Group=www-data
WorkingDirectory=/home/aida/Site
ExecStart=/home/aida/Site/venv/bin/gunicorn \
          --access-logfile - \
          --workers 3 \
          --bind unix:/run/siteaida.sock \
          SitaAIDA.wsgi:application

[Install]
WantedBy=multi-user.target


Em qui., 10 de set. de 2020 às 04:52, Kasper Laudrup <laud...@stacktrace.dk>
escreveu:

> Hi Giovanni,
>
> On 10/09/2020 07.59, Giovanni Silva wrote:
> > Dears,
> >
> > can anyone help-me to configure a NGINX + GUNICORN to multiple projects?
> >
> > for the first project everything is work fine, for the second project, I
> > create a new .socket file and new service file..
> >
> > The nginx and gunicorn is running, but when I try to access my site,
> > appears the default page of nginx..
> >
> > Any suggestions??
> >
>
> You would probably have a better chance of getting some help if you
> provide us with the relevant parts of your nginx configuration and a bit
> more information about your setup (OS etc.).
>
> Anyway, have you tried following this guide:
>
>
> http://michal.karzynski.pl/blog/2013/10/29/serving-multiple-django-applications-with-nginx-gunicorn-supervisor/
>
> Kind regards,
>
> Kasper Laudrup
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/dd25b9fd-60c3-8f2f-5f76-886ec8d2e649%40stacktrace.dk
> .
>


-- 
*Giovanni Silva*
(31) 9 9532-1877

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CABO2r9dM82yukSLGPtJ7okynr-cTXF5%3DP8G85wqjxT8rDLeV_w%40mail.gmail.com.

Reply via email to