In my nginx.conf I have

.........

    server {
        listen       80 default_server;
        listen       [::]:80 default_server;
        server_name  explorejazz.com;
        root         /usr/share/nginx/html;

        # Load configuration files for the default server block.
        include /etc/nginx/default.d/*.conf;

        location ~* /(\w+)/static/ {
            root /opt/web2py_apps/web2py/applications/;
        }

        location / {
            include uwsgi_params;
            uwsgi_pass unix:/run/uwsgi/web2py.sock;
        }

        error_page 404 /404.html;
            location = /40x.html {
        }

        error_page 500 502 503 504 /50x.html;
            location = /50x.html {
        }
    }

    server {
        listen 443;
        server_name explorejazz.com;

        ssl on;
        ssl_certificate /etc/nginx/ssl/web2py.crt;
        ssl_certificate_key /etc/nginx/ssl/web2py.key;

        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers "HIGH:!aNULL:!MD5 or HIGH:!aNULL:!MD5:!3DES";
        ssl_prefer_server_ciphers on;

        location / {
            include uwsgi_params;
            uwsgi_pass unix:/run/uwsgi/web2py.sock;
        }
    }

Maybe I should copy the
        location ~* /(\w+)/static/ {
            root /opt/web2py_apps/web2py/applications/;
        }
bit to  the listen 443 section?

This looks like it is routing directly to the static folde, and so appears
like it could cause the difference between the http and https behaviour.

Peter

On Thu, Dec 1, 2016 at 8:23 AM, Dave S <snidely....@gmail.com> wrote:

>
>
> On Thursday, December 1, 2016 at 12:23:26 AM UTC-8, Dave S wrote:
>>
>>
>>
>> On Tuesday, November 29, 2016 at 9:35:10 AM UTC-8, peter wrote:
>>>
>>> In my routes.py I have
>>>
>>> routes_in = ((r'.*://spinjazz.net:\w* /static/$anything',
>>> r'/new_spin2/static/$anything'),
>>>
>>> presumably this is routing only http correctly can anyone tell me how I
>>> can get it to work for https
>>>
>>> Thanks
>>> Peter
>>>
>>>
>> I see you're using nginx ... can you show us some of the config?
>>
>>
> The http version indicates you have a nice-looking site, BTW.
>
>
>> /dps
>>
>> --
> 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/zQRFXsmMD5A/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@googlegroups.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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to