Attached, my configuration files:

-nginx.conf (nginx main file)
-site1 (domain 1 that should be routed to app2 from web2py, I just
changed names for privacy reasons)
-site2 (domain 2 that should be routed to app2 from web2py, I just
changed names for privacy reasons)

Em seg, 1 de jul de 2019 às 13:03, Alex Beskopilny <[email protected]> escreveu:
>
>
>
> понедельник, 1 июля 2019 г., 16:23:30 UTC+3 пользователь Áureo Dias Neto 
> написал:
>>
>>
>> .....
>
> for me works
> 1 up second gunicorn
> 2  dom2.conf
> upstream gunidom2 { server unix:/home/w2p/var/guni-dom2.sock fail_timeout=0; }
>
> server {
>
>         listen xx.yy.zz.ww:443 ssl http2;
>          server_name dom2.ru;
>          add_header Strict-Transport-Security "max-age=31536000; 
> includeSubDomains";
>
>           add_header Allow "GET, POST, HEAD, DELETE" always;
>           if ( $request_method !~ ^(GET|POST|HEAD|DELETE)$ ) {
>               return 444;
>          }
>
> ssl_certificate /etc/letsencrypt/live/dom2.ru/fullchain.pem;
> ssl_certificate_key /etc/letsencrypt/live/dom2.ru/privkey.pem;
> ssl_trusted_certificate /etc/letsencrypt/live/dom2.ru/chain.pem;
>
> resolver 127.0.0.1 valid=86400 ipv6=off;
>
> ssl on;
>
> ......
> }
> ......
> location / {
>
>                 try_files $uri @proxy_to_gunidom2;
>         }
>
> location @proxy_to_gunidom2 {
>                 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
>                 proxy_set_header X-Forwarded-Ssl on;
>                 proxy_set_header Host  dom2.ru;
>                 proxy_redirect off;
>
> add_header X-Frame-Options DENY;
> add_header X-Content-Type-Options nosniff;
> add_header X-XSS-Protection "1; mode=block;";
> add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" 
> always;
>
>                 proxy_set_header        X-Forwarded-By    
> $server_addr:$server_port;
>                 proxy_set_header        X-Forwarded-Proto $scheme;
>                 proxy_set_header        X-Real-IP         $remote_addr;
>
>
>                 proxy_pass http://gunidom2;
>              rewrite ^/$ /dom2 last;
>         }
>
>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to a topic in the Google 
> Groups "web2py-users" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/web2py/NOIo7F3Ztd8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/web2py/0e914b35-a6a1-49cb-adf4-1cd4b1ed41d0%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CACtsUSOxJ%2B2mZOxtFQ9UzwBz40%2B2fqXfFmM1B9%2B7cssr%2B6tBCQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Attachment: nginx.conf
Description: Binary data

Attachment: site1.net
Description: Binary data

Attachment: site2.net
Description: Binary data

Reply via email to