[web2py] Conflict between Apache2 and web2py

2013-10-09 Thread Miguel Sánchez
Hello Massimo and list members

I'm sociologist from Colombia.  technology entusiastic and have a server 
for humanitarian and professional  purposes. 

I have an entry question and a second one is about my technical 
difficulties>
First> Almost a month ago I knew web2py and I liked it a lot!!!, and I 
would like to have my website running on it because I found it powefull, 
secure and scalable, also I like to hack, and with new challenges I could 
learned  few things of computing. 
  
But, I don't know anything about python, I ' m not a programmer but I use 
linux from almost ten years and I know the basics to mount a server by 
myself (needing help obviously). 
What do you suggest to me?: continue installing web2py or   go back to my 
joomla platform and "shutdown and go with web2py like the popular saying 
here" ?

The second question, not less important, and the reason to write to you> 


The problem is> In my VPS Server If I run python web2py  it works fine 
in 8000 port but inmediately   My other Apache Virtual Host falls down. 
When I kill web2py, Apache goes again up when I restart it.

In contrast, tests on my  personal lapton go  well with Apache and web2py

Activating by   mod_wsgi and mod_proxy alternatives. None of them works.



So,
Could yo help me please. My project release is in November and I have a lot 
of work to do  so in website content. 
Thank you 
*
Miguel Sanchez
Bogota/ Colombia
@kublaykan




Here, some details>*


My Server has these caracteristics>

VPS on EC2 Amazon>  Linux  3.2.0-54-virtual #82-Ubuntu SMP Tue Sep 10 
20:31:18 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Apache/2.2.22 
PHP Version 5.3.10-1ubuntu3.8

Loaded modules> core mod_log_config mod_logio prefork http_core mod_so 
mod_alias mod_auth_basic mod_authn_file mod_authz_default 
mod_authz_groupfile mod_authz_host mod_authz_user mod_autoindex mod_cgi 
mod_deflate mod_dir mod_env mod_mime mod_negotiation mod_php5 mod_proxy 
mod_proxy_html mod_proxy_http mod_reqtimeout mod_rewrite mod_setenvif 
mod_ssl mod_status mod_userdir mod_wsgi 
Registered PHP Streams https, ftps, compress.zlib, compress.bzip2, php, 
file, glob, data, http, ftp, phar, zip Registered Stream Socket Transports tcp, 
udp, unix, udg, ssl, sslv3, tls Registered Stream Filters zlib.*, bzip2.*, 
convert.iconv.*, string.rot13, string.toupper, string.tolower, 
string.strip_tags, convert.*, consumed, dechunk, mcrypt.*, mdecrypt.* 

Virtual Directory support disabled  (and I use my sites-enabled with 
a2ensite /// (I tought that I was using virtual directory with my 
sites-available 

drwxr-xr-x   7 root root  4096 Oct  9 15:43 .
drwxr-xr-x 116 root root  4096 Oct  9 16:29 ..
-rw-r--r--   1 root root  8358 Oct  9 16:31 apache2.conf
drwxr-xr-x   2 root root  4096 Oct  6 20:02 conf.d
-rw-r--r--   1 root root  1322 Feb  7  2012 envvars
-rw-r--r--   1 root root 1 Oct  9 15:43 httpd.conf
-rw-r--r--   1 root root 31063 Feb  7  2012 magic
drwxr-xr-x   2 root root 12288 Oct  9 13:08 mods-available
drwxr-xr-x   2 root root  4096 Oct  9 16:27 mods-enabled
-rw-r--r--   1 root root   757 Oct  8 15:23 ports.conf
drwxr-xr-x   2 root root  4096 Oct  9 16:13 sites-available
drwxr-xr-x   2 root root  4096 Oct  9 16:56 sites-enabled
-rw-r--r--   1 root root   977 Oct  9 13:39 ssl


In /var/www I have a default index page, an ushahidi platform in a sub 
domain (or virtual host) and other map application in other subdomain.

&

I followed the instructions on implementation recepies at 
http://www.web2py.com/books/default/chapter/36/13/recetas-de-implementacion#Configuraci%C3%B3n-con-Apache

1. Installed modules

2. Changed my  "default" file in /etc/apache2/sites-available  as suggested

3. Downloaded and located WEB2PY in  /var/www/web2py   asigned them to 
www-data:www-data   

First I Tried configuring  with 
mod_wsgi and  SSL content  (suggested in your page   *With this option 
nothing happened


then with 
mod_proxy * using this  server says that 

"ProxyRequests are not permited" 

other logs says> that the mod_proxy version is earlier than my python version . 
Googling I found that
I could reconfigure the module, but I found that difference between versions 
couldn't be the problem, so I didn't used 
that option.

ALTERNATIVES USED>

1. Enabled an alternate web2py in /etc/apache2/sites-available  

2. Tried to comment Proxy requests but then Apache didn't know how to execute 
web2py.py  


3.Created a web2py file in  /etc/apache2/sites-available 


So,

Could yo help me please. 
Thanks
Miguel Sanchez
@kublaykan

-- 
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://gro

Re: [web2py] Re: javascript/openlayers example in web2py

2014-01-16 Thread Miguel Sánchez
Hi Manuele and other members,

I ´m not a programmer,  I come from the Human Sciences, but I´m mounting my 
social project in http://redhumus.org  . I have a lot of issues yet.

I have created the plugin_map in my application to manage gpx tracks from 
openstreetmaps. The deal is create an application that lets people upload a 
gpx track, visualize it ina a teble and in a openlayer from OpenStreetMaps. 

To begin: I have a simple  example here, moving the original simple 
exercise (
http://redhumus.org/mapas/memoria/comunicacioneschilapastrackmap.html)  to 
web2py in https://redhumus.org:8000/redhumus/plugin_mapas/mapa   But I´m 
experiencing problems with it.  

I would appreciate your help and from anyone interested in participate 
supporting me in this new project named "ReDHumus" because I´m alone and 
the process is too slow.

Thanks a lot.


*My Code:*


*In controllers/plugin_mapas.py :*

# coding: utf8
def mapa():
 return dict()

*In views/plugin_mapas/mapa.html :  ( I have commented your code because I 
didn´t got how to set map height) *









*{{# here I load the necessary openlayers library and style sheets start = 
0 for idx,source in enumerate(( 'openlayers/OpenLayers.js',
 'openlayers/OpenStreetMap.js', 'OpenLayers-2.11/style.css',  )):  
 # response.files.insert(start+idx,URL(request.application,'static',source))  
   response.files.append(URL(request.application,'static',source))pass}}   
  // Start position for the map (hardcoded here for 
simplicity, // but maybe you want to get this from the URL params)  
   var lat=4.83091 var lon=-72.696624
 var zoom=12   function init() { var map; //complex object of type 
OpenLayers.Map   map = new OpenLayers.Map ("map", {controls:[ new 
OpenLayers.Control.Navigation(), new OpenLayers.Control.PanZoomBar(), new 
OpenLayers.Control.LayerSwitcher(), new OpenLayers.Control.Attribution()],  
 // maxExtent: new 
OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),  
 //maxResolution: 156543.0399,  
 //numZoomLevels: 13,   //units: 'm',  
 //projection: new OpenLayers.Projection("EPSG:900913"),
   //displayProjection: new OpenLayers.Projection("EPSG:4326")  
  } );   // Define the map layer // Here we use a predefined 
layer that will be kept up to date with URL changes layerMapnik = new 
OpenLayers.Layer.OSM.Mapnik("Mapnik"); map.addLayer(layerMapnik); 
layerCycleMap = new OpenLayers.Layer.OSM.CycleMap("CycleMap"); 
map.addLayer(layerCycleMap); layerMarkers = new 
OpenLayers.Layer.Markers("Markers"); map.addLayer(layerMarkers);  // Add 
the Layer with the GPX Track var abril18lgpx = new 
OpenLayers.Layer.Vector("Abril 18", { strategies: [new 
OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({  
  url: "tracks/2013-04-18_082438.gpx", format: new 
OpenLayers.Format.GPX() }), style: {strokeColor: "green", strokeWidth: 5, 
strokeOpacity: 0.5}, projection: new OpenLayers.Projection("EPSG:4326") }); 
// Add the Layer with the GPX Track var abril23lgpx = new 
OpenLayers.Layer.Vector("Abril 23", { strategies: [new 
OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({ url: 
"tracks/2013-04-23_070052.gpx", format: new OpenLayers.Format.GPX() }), 
style: {strokeColor: "blue", strokeWidth: 5, strokeOpacity: 0.5}, 
projection: new OpenLayers.Projection("EPSG:4326") }); // Add the Layer 
with the GPX Track var abril24lgpx = new OpenLayers.Layer.Vector("Abril 
24", { strategies: [new OpenLayers.Strategy.Fixed()], protocol: new 
OpenLayers.Protocol.HTTP({ url: "tracks/2013-04-24_071627.gpx", format: new 
OpenLayers.Format.GPX() }), style: {strokeColor: "red", strokeWidth: 5, 
strokeOpacity: 0.5}, projection: new OpenLayers.Projection("EPSG:4326") }); 
// Add the Layer with the GPX Track var abril21lgpx = new 
OpenLayers.Layer.Vector("Abril 21", { strategies: [new 
OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({ url: 
"tracks/2013-04-21_151923_001", format: new OpenLayers.Format.GPX() }), 
style: {strokeColor: "blue", strokeWidth: 5, strokeOpacity: 0.5}, 
projection: new OpenLayers.Projection("EPSG:4326") }); // Add the Layer 
with the GPX Track var abril258amlgpx = new OpenLayers.Layer.Vector("Abril 
25 8am", { strategies: [new OpenLayers.Strategy.Fixed()], protocol: new 
OpenLayers.Protocol.HTTP({ url: "tracks/2013-04-25_082118.gpx", format: new 
OpenLayers.Format.GPX() }), style: {strokeColor: "yellow", strokeWidth: 5, 
strokeOpacity: 0.5}, projection: new OpenLayers.Projection("EPSG:4326") }); 
// Add the Layer with the GPX Track var abril251pmlgpx = new 
OpenLayers.Layer.Vector("Abril 25 1pm", { strategies: [new 
OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({ url: 
"tracks/2013-04-25_130838.gpx", format: new OpenLayers.Format.GPX()