The web server block for https probably needs all the same locations and 
error pages and such as the http server block has for the site to act the 
same. If those rules created identify the locations of items for the web 
server allow it to work in http, it only makes sense that the same rules 
should be needed in the https server.

The only difference should probably be that extra stuff for ssl certs, and 
port numbers obviously. 

There is one line that includes files:
include /etc/nginx/default.d/*.conf;

I use apache so I am only guessing, but you will want to examine the files 
to be sure if you include them on the https that nothing in there will 
botch up the ssl you are shooting for. You probably need a good reference 
to troubleshoot this thing by changing one line at  a time and seeing if 
that fixed it. Then referring to the docs for help on what the items mean. 
The link below looks like it might be what I would start out reading if I 
was undertaking such a task.

http://nginx.org/en/docs/http/configuring_https_servers.html

That being said, the first thing I'd try is to copy all that stuff in and 
see what happens after a quick glance at the *.conf files. And then like 
Leonel did, try loading each resource one at a time to see if they all 
work. At least one of each type in each folder and so on, just to be sure. 

Good Luck,
Brian


On Thursday, December 1, 2016 at 10:40:59 AM UTC-8, peter wrote:
>
> 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 <snide...@gmail.com <javascript:>> 
> 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+un...@googlegroups.com <javascript:>.
>> 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