[web2py] Http to Https [URGENT]

2017-05-22 Thread sunda . amran
Hello guys,


I am using web2py and since i chane the link from http to https, the mail 
server is not working anymore.


Does someone had the same problem ?

Amran

-- 
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.


[web2py] nginx web2py http to https rewrite

2013-08-29 Thread lbd
Hi all, I recently setup a site using the nginx web2py ubuntu script. What 
I want to do is redirect all http traffic to https. In order to do this I 
tried modifying the /etc/nginx/sites-available/web2py script with a simple 
rewrite rule:

server {
listen  80;
server_name $hostname;
###to enable correct use of response.static_version
#location ~* /(\w+)/static(?:/_[\d]+\.[\d]+\.[\d]+)?/(.*)$ {
#alias /home/www-data/web2py/applications/$1/static/$2;
#expires max;
#}
###

## redirect http to https ##
rewrite^ https://$server_name$request_uri? permanent;


Ironically if I type in my domain name using https://www.example.com or 
https://example.com it works perfectly. However when using http://.
I cannot get to the site?

Please could someone advise me as to what I am missing? Is there somewhere 
else in the nginx conf that i need to configure this, or in web2py itself?


-- 

--- 
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/groups/opt_out.


[web2py] Re: nginx web2py http to https rewrite

2013-08-29 Thread Niphlod
if you want the server not to work on http but only in https, then you 
should have only one directive in the server block listeing to the 80 port:
server {
   listen 80;
   return 301 https://$host$request_uri;
}

On Thursday, August 29, 2013 10:15:43 AM UTC+2, lbd wrote:

 Hi all, I recently setup a site using the nginx web2py ubuntu script. What 
 I want to do is redirect all http traffic to https. In order to do this I 
 tried modifying the /etc/nginx/sites-available/web2py script with a simple 
 rewrite rule:

 server {
 listen  80;
 server_name $hostname;
 ###to enable correct use of response.static_version
 #location ~* /(\w+)/static(?:/_[\d]+\.[\d]+\.[\d]+)?/(.*)$ {
 #alias /home/www-data/web2py/applications/$1/static/$2;
 #expires max;
 #}
 ###

 ## redirect http to https ##
 rewrite^ https://$server_name$request_uri? permanent;


 Ironically if I type in my domain name using https://www.example.com or 
 https://example.com it works perfectly. However when using http://.
 I cannot get to the site?

 Please could someone advise me as to what I am missing? Is there somewhere 
 else in the nginx conf that i need to configure this, or in web2py itself?




-- 

--- 
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/groups/opt_out.


[web2py] Re: nginx web2py http to https rewrite

2013-08-29 Thread lbd
Thank you Niphlod, I would like it to listen on 80, but rewrite to https 
for all. I take it this is to be configured in 
the  /etc/nginx/sites-available/web2py file?

I will give it a bash now.

Much appreciated.

On Thursday, 29 August 2013 12:36:35 UTC+2, Niphlod wrote:

 if you want the server not to work on http but only in https, then you 
 should have only one directive in the server block listeing to the 80 port:
 server {
listen 80;
return 301 https://$host$request_uri;
 }

 On Thursday, August 29, 2013 10:15:43 AM UTC+2, lbd wrote:

 Hi all, I recently setup a site using the nginx web2py ubuntu script. 
 What I want to do is redirect all http traffic to https. In order to do 
 this I tried modifying the /etc/nginx/sites-available/web2py script with a 
 simple rewrite rule:

 server {
 listen  80;
 server_name $hostname;
 ###to enable correct use of response.static_version
 #location ~* /(\w+)/static(?:/_[\d]+\.[\d]+\.[\d]+)?/(.*)$ {
 #alias /home/www-data/web2py/applications/$1/static/$2;
 #expires max;
 #}
 ###

 ## redirect http to https ##
 rewrite^ https://$server_name$request_uri? permanent;


 Ironically if I type in my domain name using https://www.example.com or 
 https://example.com it works perfectly. However when using http://.
 I cannot get to the site?

 Please could someone advise me as to what I am missing? Is there 
 somewhere else in the nginx conf that i need to configure this, or in 
 web2py itself?




-- 

--- 
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/groups/opt_out.


[web2py] Re: nginx web2py http to https rewrite

2013-08-29 Thread lbd
Awesome Niphlod, that works like a bomb. I really appreciate it.



On Thursday, 29 August 2013 12:36:35 UTC+2, Niphlod wrote:

 if you want the server not to work on http but only in https, then you 
 should have only one directive in the server block listeing to the 80 port:
 server {
listen 80;
return 301 https://$host$request_uri;
 }

 On Thursday, August 29, 2013 10:15:43 AM UTC+2, lbd wrote:

 Hi all, I recently setup a site using the nginx web2py ubuntu script. 
 What I want to do is redirect all http traffic to https. In order to do 
 this I tried modifying the /etc/nginx/sites-available/web2py script with a 
 simple rewrite rule:

 server {
 listen  80;
 server_name $hostname;
 ###to enable correct use of response.static_version
 #location ~* /(\w+)/static(?:/_[\d]+\.[\d]+\.[\d]+)?/(.*)$ {
 #alias /home/www-data/web2py/applications/$1/static/$2;
 #expires max;
 #}
 ###

 ## redirect http to https ##
 rewrite^ https://$server_name$request_uri? permanent;


 Ironically if I type in my domain name using https://www.example.com or 
 https://example.com it works perfectly. However when using http://.
 I cannot get to the site?

 Please could someone advise me as to what I am missing? Is there 
 somewhere else in the nginx conf that i need to configure this, or in 
 web2py itself?




-- 

--- 
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/groups/opt_out.


Re: [web2py] http and https

2011-02-04 Thread Tom Atkins
Yes - I should have said that I was assuming it was running behind Apache.
 With the standard setup as created by the 'setup-ubuntu.sh' or
'setup-fedora.sh' scripts (in the scripts folder) you'll already be set with
a self-sigend certificate and Apache configured to send https requests to
web2py.

On 3 February 2011 23:37, Jonathan Lundell jlund...@pobox.com wrote:

 On Feb 3, 2011, at 2:43 PM, Vasile Ermicioi wrote:
  there are 2 ports, so I think he must run 2 instances,
   he can use router if he uses a proxy like nginx which will pass all
 requests to the web2py
 

 It should work for Apache, too, as long as Apache is configured to go to
 web2py for both domains/ports.

 Speaking of which, there's no real need for separate subdomains, I don't
 think. some.domain.com should be able to serve both http and https.


Re: [web2py] http and https

2011-02-04 Thread Alexandre Andrade
you just need to setup it in apache, like in the book:

http://web2py.com/book/default/chapter/11#mod_wsgi

http://web2py.com/book/default/chapter/11#mod_wsgiand:

http://web2py.com/book/default/chapter/11#mod_wsgi-and-SSL

http://web2py.com/book/default/chapter/11#mod_wsgi-and-SSLOr if you use
ubuntu/debian, just:

http://web2py.com/book/default/chapter/11#One-Step-Production-Deployment

http://web2py.com/book/default/chapter/11#One-Step-Production-Deployment

2011/2/3 Martin Weissenboeck mweis...@gmail.com

 Hi,

 I want to use one server with two addresses, e.g.
 http://www.mydomain.org:80 and https://secure.mydomain.org:443

 What shall I do:
 - start two instances of web2py
 - or use URL-rewrite?

 Regards,
 Martin




-- 
Atenciosamente


Alexandre Andrade
Hipercenter.com Classificados Gratuitos e Inteligentes


Re: [web2py] http and https

2011-02-04 Thread Jonathan Lundell
On Feb 4, 2011, at 1:54 AM, Martin Weissenboeck wrote:
 Thanks for all answers.
 A second question:
 
 If I want to use port 8000 for http and 8001 for https:
 is it possible to write
 
 routers = dict(
   BASE  = dict(
   domains = {
   'http://www.domain.com:8000'  : 'myappname1',
   'https://www.domain.com:8001' : 'myappname2',
   }
   ),
 )
 
 Or: how does web2py know which protocol should be used?
 

The domains dict does not support the scheme string. Your example above needs 
to be:

routers = dict(
  BASE  = dict(
  domains = {
  'www.domain.com:8000' : 'myappname1',
  'www.domain.com:8001' : 'myappname2',
  }
  ),
)

web2py doesn't need to know what the protocol is (and for that matter has no 
guaranteed way of finding out, though often it's available from the server). 
But if both http and https are supported, they can't both be on the same 
domain:port combination. So (as above) use the port to distinguish.

[web2py] http and https

2011-02-03 Thread Martin Weissenboeck
Hi,

I want to use one server with two addresses, e.g. http://www.mydomain.org:80and
https://secure.mydomain.org:443

What shall I do:
- start two instances of web2py
- or use URL-rewrite?

Regards,
Martin


Re: [web2py] http and https

2011-02-03 Thread Tom Atkins
No need to start to instances of web2py. If you use Jonathan's new routers
syntax available in trunk you can put something like this in routes.py:

routers = dict(
  BASE  = dict(
  domains = {
  'www.domain.com:80 http://domain.com/'  : 'myappname',
  'secure.domain.com:443' : 'myappname',
  }
  ),
)

Have a look at the documentation in router.example.py.  It's very powerful
and much more straightforward than the old routes.

On 3 February 2011 21:28, Martin Weissenboeck mweis...@gmail.com wrote:

 Hi,

 I want to use one server with two addresses, e.g.
 http://www.mydomain.org:80 and https://secure.mydomain.org:443

 What shall I do:
 - start two instances of web2py
 - or use URL-rewrite?

 Regards,
 Martin




Re: [web2py] http and https

2011-02-03 Thread Vasile Ermicioi
there are 2 ports, so I think he must run 2 instances,
 he can use router if he uses a proxy like nginx which will pass all
requests to the web2py


Re: [web2py] http and https

2011-02-03 Thread Jonathan Lundell
On Feb 3, 2011, at 2:43 PM, Vasile Ermicioi wrote:
 there are 2 ports, so I think he must run 2 instances, 
  he can use router if he uses a proxy like nginx which will pass all requests 
 to the web2py 
 

It should work for Apache, too, as long as Apache is configured to go to web2py 
for both domains/ports.

Speaking of which, there's no real need for separate subdomains, I don't think. 
some.domain.com should be able to serve both http and https.