Re: [web2py] Re: Web2py with ngix

2016-12-12 Thread Richard Vézina
Hello Boggy,

Are you installing web2py over your own server or or cloud service?

If it your own server can you details what you have done so far, are you
trying to install web2py by hand or you use one the scripts provided with
web2py?

Richard

On Sat, Dec 10, 2016 at 2:21 AM, J Boggy  wrote:

> thz i have been solved.
> Now other error is i cannot import some module althougn i have been
> installed and tested on python. But in web2py controller i can't import
> module
>
> --
> 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.
>

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


Re: [web2py] Re: Web2py with ngix

2016-12-09 Thread J Boggy
thz i have been solved. 
Now other error is i cannot import some module althougn i have been installed 
and tested on python. But in web2py controller i can't import module

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


Re: [web2py] Re: Web2py with ngix

2016-12-09 Thread wish7code
https://github.com/web2py/web2py/issues/1545

Cheers
Toby

On Friday, 9 December 2016 02:32:58 UTC+1, Richard wrote:
>
> Could you link issue here?
>
>
> Richard
>
> On Thu, Dec 8, 2016 at 5:03 PM, > wrote:
>
>> I just posted an issue with uwsgi and setup-web2py-nginx-uwsgi-ubuntu.sh to 
>> the mailing list ( 
>> https://groups.google.com/forum/#!topic/web2py/U_GTzcdXdKE )
>> This might possible be related..
>>
>> On Thursday, 8 December 2016 05:53:58 UTC+1, J Boggy wrote:
>>
>>> Web2py with ngix start work well.
>>> But when i start uwsgi 
>>> it show  uwsgi.service not found error.
>>> If i need to create service i don't know how to create.
>>> I follow this way
>>>
>>> https://www.digitalocean.com/community/tutorials/how-to-deploy-web2py-python-applications-with-uwsgi-and-nginx-on-ubuntu-14-04
>>>
>> -- 
>> 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+un...@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.


Re: [web2py] Re: Web2py with ngix

2016-12-09 Thread Richard Vézina
Yes, there were a lot of changes related to systemd as the way to init
deamon as change a lot... Despite all the criticism about systemd, I found
it a lot more simpler to write init (just a few lines of code) compare to
the old /etc/init.d/ bash script file...

Regards

Richard



On Fri, Dec 9, 2016 at 9:00 AM, Mirek Zvolský  wrote:

> Thanks, Richard.
> I have my Web2py fork and I will send PR in the future if I will know,
> what to improve.
>
> I have just now compared current Web2py script --vs-- version of script I
> have used (it was in my fork, but I have reinstalled without it) --vs--
> configuration files on my well working server,
>
> and I see all of them have all 3 configuration files (/etc/init/..,
> /etc/uwsgi/.., /etc/systemd/system/..)
> and these files are identical.
> So I think the installation with the nginx/ubuntu script (from trunk) will
> work.
>
> There was some problem in OLD history (2015?):
> /etc/uwsgi/web2py.ini was missing (web2py 2.13.4) + there was a missing
> code in /etc/systemd/system/emperor.uwsgi.service
>
> see this thread: https://groups.google.com/foru
> m/#!starred/web2py/ZM9IIEjtHSI
>
> I think today is all ok with current stable and with trunk too.
>
>
>
>
> On Thursday, 8 December 2016 18:01:46 UTC+1, Richard wrote:
>>
>> No problem...
>>
>> You maybe could post diff of your change, it would greatly help to
>> understand what you change.
>>
>> Maybe it get rejected because it was applying for Debian only?
>>
>> Anyway thanks for your contribution, I just want to point you in the
>> rigth direction to improve chance your work didn't get lost on the list as
>> it happen sometimes.
>>
>> :)
>>
>> Richard
>>
>>
>>
>> On Thu, Dec 8, 2016 at 10:29 AM, Mirek Zvolský  wrote:
>>
>>> Hi Richard.
>>>
>>> I'm beginner with Linux (upgrade from Windows to Linux was one of best
>>> steps in my professional life!).
>>> However at this time it is for me not good idea to write bash scripts
>>> for some complex product.
>>>
>>> In fact I made PR in this case (when I have added something from other
>>> post in this user group into the Web2py nginx/ubuntu script).
>>> It was not accepted, but maybe the team has implemented/reimplemented
>>> the changes into the framework full or partially.
>>>
>>> But I am not sure about this (and haven't time to test it).
>>> This is the reason why I have written:
>>>   - give first opportunity to the script from framework (github
>>> web2py/web2py),
>>>   - if it fails, then (maybe) my version could work.
>>>
>>>
>>>
>>>
>>> On Thursday, 8 December 2016 16:08:32 UTC+1, Richard wrote:

 Hello Mirek,

 Your contribution is pretty much appreciate, but it would make more
 sens that you submit your improvements as a PR over github and then point
 other users over you fork or the PR pending acceptation our your commit
 once PR accepted...

 Thanks for your help

 Richard

 On Thu, Dec 8, 2016 at 7:27 AM, Mirek Zvolský  wrote:

> One thing more
> In my opinion the service is controlled without ".service" in name.
>
> systemctl start emperor.uwsgi(if 
> /etc/systemd/system/emperor.uwsgi.service
> used)
>
> systemctl start uwsgi(if the name is /etc/systemd/system/uwsgi.service
> as (maybe) in your 'digitalocean' article)
>
>
>
>
>
> On Thursday, 8 December 2016 05:53:58 UTC+1, J Boggy wrote:
>
>> Web2py with ngix start work well.
>> But when i start uwsgi
>> it show  uwsgi.service not found error.
>> If i need to create service i don't know how to create.
>> I follow this way
>> https://www.digitalocean.com/community/tutorials/how-to-depl
>> oy-web2py-python-applications-with-uwsgi-and-nginx-on-ubuntu-14-04
>>
> --
> 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+un...@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+un...@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

Re: [web2py] Re: Web2py with ngix

2016-12-09 Thread Mirek Zvolský
Thanks, Richard.
I have my Web2py fork and I will send PR in the future if I will know, what 
to improve.

I have just now compared current Web2py script --vs-- version of script I 
have used (it was in my fork, but I have reinstalled without it) --vs-- 
configuration files on my well working server,

and I see all of them have all 3 configuration files (/etc/init/.., 
/etc/uwsgi/.., /etc/systemd/system/..)
and these files are identical.
So I think the installation with the nginx/ubuntu script (from trunk) will 
work.

There was some problem in OLD history (2015?):
/etc/uwsgi/web2py.ini was missing (web2py 2.13.4) + there was a missing 
code in /etc/systemd/system/emperor.uwsgi.service

see this thread: 
https://groups.google.com/forum/#!starred/web2py/ZM9IIEjtHSI

I think today is all ok with current stable and with trunk too.




On Thursday, 8 December 2016 18:01:46 UTC+1, Richard wrote:
>
> No problem...
>
> You maybe could post diff of your change, it would greatly help to 
> understand what you change.
>
> Maybe it get rejected because it was applying for Debian only?
>
> Anyway thanks for your contribution, I just want to point you in the rigth 
> direction to improve chance your work didn't get lost on the list as it 
> happen sometimes.
>
> :)
>
> Richard
>
>
>
> On Thu, Dec 8, 2016 at 10:29 AM, Mirek Zvolský  > wrote:
>
>> Hi Richard.
>>
>> I'm beginner with Linux (upgrade from Windows to Linux was one of best 
>> steps in my professional life!).
>> However at this time it is for me not good idea to write bash scripts for 
>> some complex product.
>>
>> In fact I made PR in this case (when I have added something from other 
>> post in this user group into the Web2py nginx/ubuntu script).
>> It was not accepted, but maybe the team has implemented/reimplemented the 
>> changes into the framework full or partially.
>>
>> But I am not sure about this (and haven't time to test it).
>> This is the reason why I have written:
>>   - give first opportunity to the script from framework (github 
>> web2py/web2py),
>>   - if it fails, then (maybe) my version could work.
>>
>>
>>
>>
>> On Thursday, 8 December 2016 16:08:32 UTC+1, Richard wrote:
>>>
>>> Hello Mirek,
>>>
>>> Your contribution is pretty much appreciate, but it would make more sens 
>>> that you submit your improvements as a PR over github and then point other 
>>> users over you fork or the PR pending acceptation our your commit once PR 
>>> accepted...
>>>
>>> Thanks for your help
>>>
>>> Richard
>>>
>>> On Thu, Dec 8, 2016 at 7:27 AM, Mirek Zvolský  wrote:
>>>
 One thing more
 In my opinion the service is controlled without ".service" in name.

 systemctl start emperor.uwsgi(if 
 /etc/systemd/system/emperor.uwsgi.service used)

 systemctl start uwsgi(if the name is 
 /etc/systemd/system/uwsgi.service as (maybe) in your 'digitalocean' 
 article)





 On Thursday, 8 December 2016 05:53:58 UTC+1, J Boggy wrote:

> Web2py with ngix start work well.
> But when i start uwsgi 
> it show  uwsgi.service not found error.
> If i need to create service i don't know how to create.
> I follow this way
>
> https://www.digitalocean.com/community/tutorials/how-to-deploy-web2py-python-applications-with-uwsgi-and-nginx-on-ubuntu-14-04
>
 -- 
 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+un...@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+un...@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.


Re: [web2py] Re: Web2py with ngix

2016-12-08 Thread Richard Vézina
Could you link issue here?


Richard

On Thu, Dec 8, 2016 at 5:03 PM,  wrote:

> I just posted an issue with uwsgi and setup-web2py-nginx-uwsgi-ubuntu.sh to
> the mailing list ( https://groups.google.com/forum/#!topic/web2py/U_
> GTzcdXdKE )
> This might possible be related..
>
> On Thursday, 8 December 2016 05:53:58 UTC+1, J Boggy wrote:
>
>> Web2py with ngix start work well.
>> But when i start uwsgi
>> it show  uwsgi.service not found error.
>> If i need to create service i don't know how to create.
>> I follow this way
>> https://www.digitalocean.com/community/tutorials/how-to-depl
>> oy-web2py-python-applications-with-uwsgi-and-nginx-on-ubuntu-14-04
>>
> --
> 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.
>

-- 
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] Re: Web2py with ngix

2016-12-08 Thread wish7code
I just posted an issue with uwsgi and setup-web2py-nginx-uwsgi-ubuntu.sh to 
the mailing list ( 
https://groups.google.com/forum/#!topic/web2py/U_GTzcdXdKE )
This might possible be related..

On Thursday, 8 December 2016 05:53:58 UTC+1, J Boggy wrote:
>
> Web2py with ngix start work well.
> But when i start uwsgi 
> it show  uwsgi.service not found error.
> If i need to create service i don't know how to create.
> I follow this way
>
> https://www.digitalocean.com/community/tutorials/how-to-deploy-web2py-python-applications-with-uwsgi-and-nginx-on-ubuntu-14-04
>

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


Re: [web2py] Re: Web2py with ngix

2016-12-08 Thread Richard Vézina
No problem...

You maybe could post diff of your change, it would greatly help to
understand what you change.

Maybe it get rejected because it was applying for Debian only?

Anyway thanks for your contribution, I just want to point you in the rigth
direction to improve chance your work didn't get lost on the list as it
happen sometimes.

:)

Richard



On Thu, Dec 8, 2016 at 10:29 AM, Mirek Zvolský  wrote:

> Hi Richard.
>
> I'm beginner with Linux (upgrade from Windows to Linux was one of best
> steps in my professional life!).
> However at this time it is for me not good idea to write bash scripts for
> some complex product.
>
> In fact I made PR in this case (when I have added something from other
> post in this user group into the Web2py nginx/ubuntu script).
> It was not accepted, but maybe the team has implemented/reimplemented the
> changes into the framework full or partially.
>
> But I am not sure about this (and haven't time to test it).
> This is the reason why I have written:
>   - give first opportunity to the script from framework (github
> web2py/web2py),
>   - if it fails, then (maybe) my version could work.
>
>
>
>
> On Thursday, 8 December 2016 16:08:32 UTC+1, Richard wrote:
>>
>> Hello Mirek,
>>
>> Your contribution is pretty much appreciate, but it would make more sens
>> that you submit your improvements as a PR over github and then point other
>> users over you fork or the PR pending acceptation our your commit once PR
>> accepted...
>>
>> Thanks for your help
>>
>> Richard
>>
>> On Thu, Dec 8, 2016 at 7:27 AM, Mirek Zvolský  wrote:
>>
>>> One thing more
>>> In my opinion the service is controlled without ".service" in name.
>>>
>>> systemctl start emperor.uwsgi(if 
>>> /etc/systemd/system/emperor.uwsgi.service
>>> used)
>>>
>>> systemctl start uwsgi(if the name is /etc/systemd/system/uwsgi.service
>>> as (maybe) in your 'digitalocean' article)
>>>
>>>
>>>
>>>
>>>
>>> On Thursday, 8 December 2016 05:53:58 UTC+1, J Boggy wrote:
>>>
 Web2py with ngix start work well.
 But when i start uwsgi
 it show  uwsgi.service not found error.
 If i need to create service i don't know how to create.
 I follow this way
 https://www.digitalocean.com/community/tutorials/how-to-depl
 oy-web2py-python-applications-with-uwsgi-and-nginx-on-ubuntu-14-04

>>> --
>>> 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+un...@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.
>

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


Re: [web2py] Re: Web2py with ngix

2016-12-08 Thread Mirek Zvolský
Hi Richard.

I'm beginner with Linux (upgrade from Windows to Linux was one of best 
steps in my professional life!).
However at this time it is for me not good idea to write bash scripts for 
some complex product.

In fact I made PR in this case (when I have added something from other post 
in this user group into the Web2py nginx/ubuntu script).
It was not accepted, but maybe the team has implemented/reimplemented the 
changes into the framework full or partially.

But I am not sure about this (and haven't time to test it).
This is the reason why I have written:
  - give first opportunity to the script from framework (github 
web2py/web2py),
  - if it fails, then (maybe) my version could work.




On Thursday, 8 December 2016 16:08:32 UTC+1, Richard wrote:
>
> Hello Mirek,
>
> Your contribution is pretty much appreciate, but it would make more sens 
> that you submit your improvements as a PR over github and then point other 
> users over you fork or the PR pending acceptation our your commit once PR 
> accepted...
>
> Thanks for your help
>
> Richard
>
> On Thu, Dec 8, 2016 at 7:27 AM, Mirek Zvolský  > wrote:
>
>> One thing more
>> In my opinion the service is controlled without ".service" in name.
>>
>> systemctl start emperor.uwsgi(if 
>> /etc/systemd/system/emperor.uwsgi.service used)
>>
>> systemctl start uwsgi(if the name is 
>> /etc/systemd/system/uwsgi.service as (maybe) in your 'digitalocean' article)
>>
>>
>>
>>
>>
>> On Thursday, 8 December 2016 05:53:58 UTC+1, J Boggy wrote:
>>
>>> Web2py with ngix start work well.
>>> But when i start uwsgi 
>>> it show  uwsgi.service not found error.
>>> If i need to create service i don't know how to create.
>>> I follow this way
>>>
>>> https://www.digitalocean.com/community/tutorials/how-to-deploy-web2py-python-applications-with-uwsgi-and-nginx-on-ubuntu-14-04
>>>
>> -- 
>> 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+un...@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.


Re: [web2py] Re: Web2py with ngix

2016-12-08 Thread Richard Vézina
Hello Mirek,

Your contribution is pretty much appreciate, but it would make more sens
that you submit your improvements as a PR over github and then point other
users over you fork or the PR pending acceptation our your commit once PR
accepted...

Thanks for your help

Richard

On Thu, Dec 8, 2016 at 7:27 AM, Mirek Zvolský  wrote:

> One thing more
> In my opinion the service is controlled without ".service" in name.
>
> systemctl start emperor.uwsgi(if /etc/systemd/system/emperor.uwsgi.service
> used)
>
> systemctl start uwsgi(if the name is /etc/systemd/system/uwsgi.service
> as (maybe) in your 'digitalocean' article)
>
>
>
>
>
> On Thursday, 8 December 2016 05:53:58 UTC+1, J Boggy wrote:
>
>> Web2py with ngix start work well.
>> But when i start uwsgi
>> it show  uwsgi.service not found error.
>> If i need to create service i don't know how to create.
>> I follow this way
>> https://www.digitalocean.com/community/tutorials/how-to-depl
>> oy-web2py-python-applications-with-uwsgi-and-nginx-on-ubuntu-14-04
>>
> --
> 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.
>

-- 
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] Re: Web2py with ngix

2016-12-08 Thread Mirek Zvolský
One thing more
In my opinion the service is controlled without ".service" in name.

systemctl start emperor.uwsgi(if 
/etc/systemd/system/emperor.uwsgi.service used)

systemctl start uwsgi(if the name is /etc/systemd/system/uwsgi.service 
as (maybe) in your 'digitalocean' article)





On Thursday, 8 December 2016 05:53:58 UTC+1, J Boggy wrote:
>
> Web2py with ngix start work well.
> But when i start uwsgi 
> it show  uwsgi.service not found error.
> If i need to create service i don't know how to create.
> I follow this way
>
> https://www.digitalocean.com/community/tutorials/how-to-deploy-web2py-python-applications-with-uwsgi-and-nginx-on-ubuntu-14-04
>

-- 
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] Re: Web2py with ngix

2016-12-08 Thread Mirek Zvolský
And here is the version of script that I have used (I hope so) to install 
on my machine.

So if you decide use the installation script 
setup-web2py-nginx-uwsgi-ubuntu.sh
maybe you could try the version from current trunk github.com/web2py/web2py
and as second one you can try this version:

#!/bin/bash
echo 'setup-web2py-nginx-uwsgi-ubuntu-precise.sh'
echo 'Requires Ubuntu > 12.04 or Debian >= 8 and installs Nginx + uWSGI + 
Web2py'
# Check if user has root privileges
if [[ $EUID -ne 0 ]]; then
   echo "You must run the script as root or using sudo"
   exit 1
fi
# parse command line arguments
nopassword=0
nocertificate=0
while [ "$#" -gt 0 ]; do
  case "$1" in
--no-password) nopassword=1; shift 1;;
--no-certificate) nocertificate=1; shift 1;;
  esac
done
# Get Web2py Admin Password
if [ "$nopassword" -eq 0 ]
then
  echo -e "Web2py Admin Password: \c "
  read  PW
fi
# Upgrade and install needed software
apt-get update
apt-get -y upgrade
apt-get autoremove
apt-get autoclean
apt-get -y install nginx-full
apt-get -y install build-essential python-dev libxml2-dev python-pip unzip
pip install setuptools --no-use-wheel --upgrade
PIPPATH=`which pip`
$PIPPATH install --upgrade uwsgi
# Create common nginx sections
mkdir /etc/nginx/conf.d/web2py
echo '
gzip_static on;
gzip_http_version   1.1;
gzip_proxiedexpired no-cache no-store private auth;
gzip_disable"MSIE [1-6]\.";
gzip_vary   on;
' > /etc/nginx/conf.d/web2py/gzip_static.conf
echo '
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/x-javascript 
text/xml application/xml application/xml+rss text/javascript;
' > /etc/nginx/conf.d/web2py/gzip.conf
# Create configuration file /etc/nginx/sites-available/web2py
echo '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;
### if you want to use pre-gzipped static files (recommended)
### check scripts/zip_static_files.py and remove the comments
# include /etc/nginx/conf.d/web2py/gzip_static.conf;
}
###

###if you use something like myapp = dict(languages=['en', 'it', 
'jp'], default_language='en') in your routes.py
#location ~* ^/(\w+)/(en|it|jp)/static/(.*)$ {
#alias /home/www-data/web2py/applications/$1/;
#try_files static/$2/$3 static/$3 =404;
#}
###

location / {
#uwsgi_pass  127.0.0.1:9001;
uwsgi_pass  unix:///tmp/web2py.socket;
include uwsgi_params;
uwsgi_param UWSGI_SCHEME $scheme;
uwsgi_param SERVER_SOFTWAREnginx/$nginx_version;

###remove the comments to turn on if you want gzip compression 
of your pages
# include /etc/nginx/conf.d/web2py/gzip.conf;
### end gzip section

### remove the comments if you use uploads (max 10 MB)
#client_max_body_size 10m;
###
}
}
server {
listen 443 default_server ssl;
server_name $hostname;
ssl_certificate /etc/nginx/ssl/web2py.crt;
ssl_certificate_key /etc/nginx/ssl/web2py.key;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
ssl_ciphers 
ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-SHA:DHE-DSS-AES256-SHA:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
keepalive_timeout70;
location / {
#uwsgi_pass  127.0.0.1:9001;
uwsgi_pass  unix:///tmp/web2py.socket;
include uwsgi_params;
uwsgi_param UWSGI_SCHEME $scheme;
uwsgi_param SERVER_SOFTWAREnginx/$nginx_version;
###remove the comments to turn on if you want gzip compression 
of your pages
# include /etc/nginx/conf.d/web2py/gzip.conf;
### end gzip section
### remove the comments if you want to enable uploads (max 10 
MB)
#client_max_body_size 10m;
###
}
###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;
### if you want to use pre-gzipped static files (recommended)
### check scripts/zip_static_files.py and remove the comments
# include /etc/nginx/conf.d/web2py/gzip_static.conf;
}
###

}' >/etc/nginx/sites-available/web2py

ln -s /etc/nginx/sites-available/web2py /etc/nginx/sites-enabled/web2py
rm /etc/ngin

[web2py] Re: Web2py with ngix

2016-12-08 Thread Mirek Zvolský
And this is the third file:

-rw-r--r-- 1 root root /etc/systemd/system/emperor.uwsgi.service

[Unit]
Description = uWSGI Emperor
After = syslog.target

[Service]
ExecStart = /usr/local/bin/uwsgi --ini /etc/uwsgi/web2py.ini
RuntimeDirectory = uwsgi
Restart = always
KillSignal = SIGQUIT
Type = notify
StandardError = syslog
NotifyAccess = all

[Install]
WantedBy = multi-user.target

... I hope it is complete now...

-- 
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] Re: Web2py with ngix

2016-12-08 Thread Mirek Zvolský
On my working machine (Debian 8 Testing (systemd), nginx)
I have installed with the script
https://github.com/web2py/web2py/blob/master/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh

but there was some problem or some missing code which I have found 
somewhere here in user group.

I am not sure if last version of the script at github.com/web2py/web2py 
works,

but maybe my files could help you:

-rw-r--r-- root root /etc/init/uwsgi-emperor.conf

description "uWSGI Emperor"
start on runlevel [2345]
stop on runlevel [06]
##
#remove the comments in the next section to enable static file compression 
for the welcome app
#in that case, turn on gzip_static on; on /etc/nginx/nginx.conf
##
#pre-start script
#python /home/www-data/web2py/web2py.py -S welcome -R 
scripts/zip_static_files.py
#chown -R www-data:www-data /home/www-data/web2py/*
#end script
respawn
exec uwsgi --master --die-on-term --emperor /etc/uwsgi --logto 
/var/log/uwsgi/uwsgi.log

-rw-r--r-- root root /etc/uwsgi/web2py.ini

[uwsgi]

socket = /tmp/web2py.socket
pythonpath = /home/www-data/web2py/
mount = /=wsgihandler:application
processes = 4
master = true
harakiri = 60
reload-mercy = 8
cpu-affinity = 1
stats = /tmp/stats.socket
max-requests = 2000
limit-as = 512
reload-on-as = 256
reload-on-rss = 192
uid = www-data
gid = www-data
touch-reload = /home/www-data/web2py/routes.py
cron = 0 0 -1 -1 -1 python /home/www-data/web2py/web2py.py -Q -S welcome -M 
-R scripts/sessions2trash.py -A -o
no-orphans = true

Previous works and I made no my own changes inside. It is just from the 
Web2py nginx/ubuntu script and from some post in this user group.

I control the servise so:
systemctl start emperor.uwsgi # stop,restart,status,...








On Thursday, 8 December 2016 05:53:58 UTC+1, J Boggy wrote:
>
> Web2py with ngix start work well.
> But when i start uwsgi 
> it show  uwsgi.service not found error.
> If i need to create service i don't know how to create.
> I follow this way
>
> https://www.digitalocean.com/community/tutorials/how-to-deploy-web2py-python-applications-with-uwsgi-and-nginx-on-ubuntu-14-04
>

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