<div dir="ltr"><span style="color:rgb(0,0,0);font-size:13px">Luis esto ya me lo habias indicado en un mail anterior. </span><div><br></div><div>Perdona Javier. Escribía desde el móvil en la calle y no miraba los correos anteriores. Ni los míos, jejeje</div></div><div class="gmail_extra"><br><div class="gmail_quote">El 22 de diciembre de 2014, 21:23, Javier Diaz <span dir="ltr"><<a href="mailto:javidiaz1977@gmail.com" target="_blank">javidiaz1977@gmail.com</a>></span> escribió:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">al modulo cgi lo active con a2enmod. Al modulo wsgi con sudo apt-get<br>
install libapache2-mod-wsgi<br>
<br>
El día 22 de diciembre de 2014, 15:35, Jorge Sanz <<a href="mailto:jsanz@osgeo.org">jsanz@osgeo.org</a>> escribió:<br>
<div class="HOEnZb"><div class="h5">> El día 22 de diciembre de 2014, 18:02, Luis Franco Vázquez<br>
> <<a href="mailto:luis.frvz@gmail.com">luis.frvz@gmail.com</a>> escribió:<br>
>> No lo había visto.<br>
>> ¿Has probado a hacer chmod a+x tu_cgi y te has asegurado que está cargado el<br>
>> módulo cgi de apache (apache2.conf:LoadModule cgi_module modules/mod_cgi.so<br>
>> )?<br>
>><br>
><br>
> Los módulos de Apache los suelo activar y desactivar con los comandos<br>
> a2enmod y a2dismod. De hecho si se ejecuta sin parámetros da una<br>
> pequeña interfaz para elegirlos.<br>
><br>
><br>
>> El 22 de diciembre de 2014, 17:54, Javier Diaz <<a href="mailto:javidiaz1977@gmail.com">javidiaz1977@gmail.com</a>><br>
>> escribió:<br>
>><br>
>>> si Luis, lo habia indicado en el primer mail a ese cambio.<br>
>>><br>
>>> El día 22 de diciembre de 2014, 13:51, Luis Franco Vázquez<br>
>>> <<a href="mailto:luis.frvz@gmail.com">luis.frvz@gmail.com</a>> escribió:<br>
>>> > Al principio de proxy.cgi hay una variable como sigue:<br>
>>> ><br>
>>> > allowedHosts = ['<a href="http://www.openlayers.org" target="_blank">www.openlayers.org</a>', '<a href="http://openlayers.org" target="_blank">openlayers.org</a>',<br>
>>> >                 '<a href="http://labs.metacarta.com" target="_blank">labs.metacarta.com</a>', '<a href="http://world.freemap.in" target="_blank">world.freemap.in</a>',<br>
>>> >                 '<a href="http://prototype.openmnnd.org" target="_blank">prototype.openmnnd.org</a>', '<a href="http://geo.openplans.org" target="_blank">geo.openplans.org</a>',<br>
>>> >                 '<a href="http://sigma.openplans.org" target="_blank">sigma.openplans.org</a>', '<a href="http://demo.boundlessgeo.com" target="_blank">demo.boundlessgeo.com</a>',<br>
>>> >                 '<a href="http://www.openstreetmap.org" target="_blank">www.openstreetmap.org</a>', '<a href="http://sample.azavea.com" target="_blank">sample.azavea.com</a>',<br>
>>> >                 '<a href="http://v2.suite.opengeo.org" target="_blank">v2.suite.opengeo.org</a>', '<a href="http://v-swe.uni-muenster.de:8080" target="_blank">v-swe.uni-muenster.de:8080</a>',<br>
>>> >                 '<a href="http://vmap0.tiles.osgeo.org" target="_blank">vmap0.tiles.osgeo.org</a>', '<a href="http://www.openrouteservice.org" target="_blank">www.openrouteservice.org</a>',<br>
>>> >                 '<a href="http://maps.wien.gv.at" target="_blank">maps.wien.gv.at</a>']<br>
>>> ><br>
>>> > ¿La has adecuado a tu caso (localhost de momento?<br>
>>> ><br>
>>> > El 22 de diciembre de 2014, 17:47, Javier Diaz <<a href="mailto:javidiaz1977@gmail.com">javidiaz1977@gmail.com</a>><br>
>>> > escribió:<br>
>>> ><br>
>>> >> Un cerveza helada a quien lo resuelva !!! :P<br>
>>> >><br>
>>> >> El día 22 de diciembre de 2014, 13:47, Javier Diaz<br>
>>> >> <<a href="mailto:javidiaz1977@gmail.com">javidiaz1977@gmail.com</a>> escribió:<br>
>>> >> > Si, habia olvida mencionarlo, pero si habia reiniciado el apache.<br>
>>> >> ><br>
>>> >> > En cuanto al propietario lo acabo de cambiar y sigue igual..... :(<br>
>>> >> ><br>
>>> >> > El día 22 de diciembre de 2014, 13:35, Luis Franco Vázquez<br>
>>> >> > <<a href="mailto:luis.frvz@gmail.com">luis.frvz@gmail.com</a>> escribió:<br>
>>> >> >> ¿Reiniciaste al apache?, ¿hiciste propietario al usuario de apache:<br>
>>> >> >> sudo<br>
>>> >> >> chown www-data.www-data /usr/lib/cgi-bin/proxy.cgi?<br>
>>> >> >><br>
>>> >> >> El 22 de diciembre de 2014, 16:49, Javier Diaz<br>
>>> >> >> <<a href="mailto:javidiaz1977@gmail.com">javidiaz1977@gmail.com</a>><br>
>>> >> >> escribió:<br>
>>> >> >><br>
>>> >> >>> Acabo de hacer la siguiente prueba:<br>
>>> >> >>> Cree el archivo test.cgi en /usr/lib/cgi-bin/ con este contenido:<br>
>>> >> >>><br>
>>> >> >>> #!/usr/bin/env python<br>
>>> >> >>> print "Status: 200 OK"<br>
>>> >> >>> print "Content-type: text/plain"<br>
>>> >> >>> print "It works!"<br>
>>> >> >>><br>
>>> >> >>> desde la terminal:<br>
>>> >> >>><br>
>>> >> >>> cd /usr/lib/cgi-bin<br>
>>> >> >>> export REQUEST_METHOD="GET"<br>
>>> >> >>> python proxy.cgi url="<a href="http://localhost/cgi-bin/test.cgi" target="_blank">http://localhost/cgi-bin/test.cgi</a>"<br>
>>> >> >>><br>
>>> >> >>> Da este error:<br>
>>> >> >>><br>
>>> >> >>> Status: 500 Unexpected Error<br>
>>> >> >>> Content-Type: text/plain<br>
>>> >> >>><br>
>>> >> >>> Some unexpected error occurred. Error text was: HTTP Error 500:<br>
>>> >> >>> Internal Server Error<br>
>>> >> >>><br>
>>> >> >>> El día 22 de diciembre de 2014, 12:31, Javier Diaz<br>
>>> >> >>> <<a href="mailto:javidiaz1977@gmail.com">javidiaz1977@gmail.com</a>> escribió:<br>
>>> >> >>> > Gracias Jorge como siempre por tu colaboracion.<br>
>>> >> >>> ><br>
>>> >> >>> > El script me saca correctamente el HTML.<br>
>>> >> >>> ><br>
>>> >> >>> > En el access.log de mi virtualhost encontre esto:<br>
>>> >> >>> ><br>
>>> >> >>> > 10.240.91.17 - - [22/Dec/2014:11:21:04 -0300] "GET<br>
>>> >> >>> > /cgi-bin/proxy.cgi<br>
>>> >> >>> > HTTP/1.0" 500 247 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64;<br>
>>> >> >>> > rv:34.0) Gecko/20100101 Firefox/34.0"<br>
>>> >> >>> > 10.240.91.17 - - [22/Dec/2014:11:35:39 -0300] "GET<br>
>>> >> >>> > /cgi-bin/proxy.cgi<br>
>>> >> >>> > HTTP/1.0" 500 247 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64;<br>
>>> >> >>> > rv:34.0) Gecko/20100101 Firefox/34.0"<br>
>>> >> >>> ><br>
>>> >> >>> ><br>
>>> >> >>> > donde 10.240.91.17 es el proxy HTTP<br>
>>> >> >>> ><br>
>>> >> >>> > El día 22 de diciembre de 2014, 11:58, Jorge Sanz<br>
>>> >> >>> > <<a href="mailto:jsanz@osgeo.org">jsanz@osgeo.org</a>><br>
>>> >> >>> > escribió:<br>
>>> >> >>> >> El 22/12/14 a las 15:48, Javier Diaz escribió:<br>
>>> >> >>> >>> Buen dia Lista. Vuelvo con este tema que ya se convertido en mi<br>
>>> >> >>> >>> karma.<br>
>>> >> >>> >>><br>
>>> >> >>> >>> Estoy usando Ubuntu 14.04 con Apache2. Estos son los pasos que<br>
>>> >> >>> >>> segui,<br>
>>> >> >>> >>> lo que figura en todos lados!!!! pero no me funciono :(<br>
>>> >> >>> >>><br>
>>> >> >>> >>> Descargue el proxy desde:<br>
>>> >> >>> >>><br>
>>> >> >>> >>> wget<br>
>>> >> >>> >>><br>
>>> >> >>> >>><br>
>>> >> >>> >>> <a href="https://raw.github.com/openlayers/openlayers/master/examples/proxy.cgi" target="_blank">https://raw.github.com/openlayers/openlayers/master/examples/proxy.cgi</a><br>
>>> >> >>> >>><br>
>>> >> >>> >>><br>
>>> >> >>> >>> Copie el archivo en:<br>
>>> >> >>> >>><br>
>>> >> >>> >>> sudo cp proxy.cgi /usr/lib/cgi-bin<br>
>>> >> >>> >>><br>
>>> >> >>> >>> Le di los permisos:<br>
>>> >> >>> >>> sudo chmod 755 /usr/lib/cgi-bin/proxy.cgi<br>
>>> >> >>> >>><br>
>>> >> >>> >>> En allowedHosts agregar el nombre del virtual host creados:<br>
>>> >> >>> >>> 'localhost', 'localhost:8080', 'ejemplo.localhost'<br>
>>> >> >>> >>><br>
>>> >> >>> >>> en el navegador:<br>
>>> >> >>> >>> http://[dominio-o-dirección-ip]/cgi-bin/proxy.cgi ......<br>
>>> >> >>> >>> Y...........nada....<br>
>>> >> >>> >>><br>
>>> >> >>> >>> Some unexpected error occurred. Error text was: <urlopen error<br>
>>> >> >>> >>> [Errno<br>
>>> >> >>> >>> -2] Name or service not known><br>
>>> >> >>> >>><br>
>>> >> >>> >>> Tengo habilitado los modulos cgi y el wsgi.<br>
>>> >> >>> >>> En /etc/apache2/sites-enabled/ejemplo1.conf tengo el<br>
>>> >> >>> >>> virtualhost,<br>
>>> >> >>> >>> donde agregue:<br>
>>> >> >>> >>><br>
>>> >> >>> >>> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/<br>
>>> >> >>> >>><br>
>>> >> >>> >>>         <Directory "/usr/lib/cgi-bin"><br>
>>> >> >>> >>>                 AllowOverride None<br>
>>> >> >>> >>>                 Options +ExecCGI -MultiViews<br>
>>> >> >>> >>> +SymLinksIfOwnerMatch<br>
>>> >> >>> >>>                 Order allow,deny<br>
>>> >> >>> >>>                 Allow from all<br>
>>> >> >>> >>>         </Directory><br>
>>> >> >>> >>><br>
>>> >> >>> >>> Pero nada....alguien que me eche un poco de luz.<br>
>>> >> >>> >>><br>
>>> >> >>> >><br>
>>> >> >>> >><br>
>>> >> >>> >> Mira a ver qué error te da en el log de apache. Normalmente en<br>
>>> >> >>> >> /var/log/apache/error.log<br>
>>> >> >>> >><br>
>>> >> >>> >> También puedes probar el archivo en local de la siguiente<br>
>>> >> >>> >> manera:<br>
>>> >> >>> >><br>
>>> >> >>> >> cd /usr/lib/cgi-bin<br>
>>> >> >>> >> export REQUEST_METHOD="GET"<br>
>>> >> >>> >> python proxy.cgi url="<a href="http://localhost" target="_blank">http://localhost</a>"<br>
>>> >> >>> >><br>
>>> >> >>> >> Y debería sacarte por pantalla el HTML, si te da otra cosa igual<br>
>>> >> >>> >> hay<br>
>>> >> >>> >> algo raro en tu instalación, pero lo normal es que funcione<br>
>>> >> >>> >> porque<br>
>>> >> >>> >> ese<br>
>>> >> >>> >> script no depende de nada que te pueda faltar, aunque nunca se<br>
>>> >> >>> >> sabe.<br>
>>> >> >>> >><br>
>>> >> >>> >> Yo lo acabo de hacer y me funciona sin mayor problema, aunque no<br>
>>> >> >>> >> tengo<br>
>>> >> >>> >> apache en local para probar más.<br>
>>> >> >>> >><br>
>>> >> >>> >> Suerte<br>
>>> >> >>> >><br>
>>> >> >>> >> --<br>
>>> >> >>> >> Jorge Gaspar Sanz Salinas<br>
>>> >> >>> >> <a href="http://es.osgeo.org" target="_blank">http://es.osgeo.org</a><br>
>>> >> >>> >> <a href="http://jorgesanz.net" target="_blank">http://jorgesanz.net</a><br>
>>> >> >>> >><br>
>>> >> >>> >><br>
>>> >> >>> >> _______________________________________________<br>
>>> >> >>> >> Spanish mailing list<br>
>>> >> >>> >> <a href="http://lists.osgeo.org/mailman/listinfo/spanish" target="_blank">http://lists.osgeo.org/mailman/listinfo/spanish</a><br>
>>> >> >>> >> <a href="http://es.osgeo.org" target="_blank">http://es.osgeo.org</a><br>
>>> >> >>> >> <a href="http://twitter.com/osgeoes" target="_blank">http://twitter.com/osgeoes</a><br>
>>> >> >>> _______________________________________________<br>
>>> >> >>> Spanish mailing list<br>
>>> >> >>> <a href="http://lists.osgeo.org/mailman/listinfo/spanish" target="_blank">http://lists.osgeo.org/mailman/listinfo/spanish</a><br>
>>> >> >>> <a href="http://es.osgeo.org" target="_blank">http://es.osgeo.org</a><br>
>>> >> >>> <a href="http://twitter.com/osgeoes" target="_blank">http://twitter.com/osgeoes</a><br>
>>> >> >><br>
>>> >> >><br>
>>> >> >><br>
>>> >> >> _______________________________________________<br>
>>> >> >> Spanish mailing list<br>
>>> >> >> <a href="http://lists.osgeo.org/mailman/listinfo/spanish" target="_blank">http://lists.osgeo.org/mailman/listinfo/spanish</a><br>
>>> >> >> <a href="http://es.osgeo.org" target="_blank">http://es.osgeo.org</a><br>
>>> >> >> <a href="http://twitter.com/osgeoes" target="_blank">http://twitter.com/osgeoes</a><br>
>>> >> _______________________________________________<br>
>>> >> Spanish mailing list<br>
>>> >> <a href="http://lists.osgeo.org/mailman/listinfo/spanish" target="_blank">http://lists.osgeo.org/mailman/listinfo/spanish</a><br>
>>> >> <a href="http://es.osgeo.org" target="_blank">http://es.osgeo.org</a><br>
>>> >> <a href="http://twitter.com/osgeoes" target="_blank">http://twitter.com/osgeoes</a><br>
>>> ><br>
>>> ><br>
>>> ><br>
>>> > _______________________________________________<br>
>>> > Spanish mailing list<br>
>>> > <a href="http://lists.osgeo.org/mailman/listinfo/spanish" target="_blank">http://lists.osgeo.org/mailman/listinfo/spanish</a><br>
>>> > <a href="http://es.osgeo.org" target="_blank">http://es.osgeo.org</a><br>
>>> > <a href="http://twitter.com/osgeoes" target="_blank">http://twitter.com/osgeoes</a><br>
>>> _______________________________________________<br>
>>> Spanish mailing list<br>
>>> <a href="http://lists.osgeo.org/mailman/listinfo/spanish" target="_blank">http://lists.osgeo.org/mailman/listinfo/spanish</a><br>
>>> <a href="http://es.osgeo.org" target="_blank">http://es.osgeo.org</a><br>
>>> <a href="http://twitter.com/osgeoes" target="_blank">http://twitter.com/osgeoes</a><br>
>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> Spanish mailing list<br>
>> <a href="http://lists.osgeo.org/mailman/listinfo/spanish" target="_blank">http://lists.osgeo.org/mailman/listinfo/spanish</a><br>
>> <a href="http://es.osgeo.org" target="_blank">http://es.osgeo.org</a><br>
>> <a href="http://twitter.com/osgeoes" target="_blank">http://twitter.com/osgeoes</a><br>
><br>
><br>
><br>
> --<br>
> Jorge Sanz<br>
> <a href="http://www.osgeo.org" target="_blank">http://www.osgeo.org</a><br>
> <a href="http://wiki.osgeo.org/wiki/Jorge_Sanz" target="_blank">http://wiki.osgeo.org/wiki/Jorge_Sanz</a><br>
> GPG: 86F8 3EA0 BD19 0CA2 801D  4FB2 6B45 68E4 6FB2 D89D<br>
> _______________________________________________<br>
> Spanish mailing list<br>
> <a href="http://lists.osgeo.org/mailman/listinfo/spanish" target="_blank">http://lists.osgeo.org/mailman/listinfo/spanish</a><br>
> <a href="http://es.osgeo.org" target="_blank">http://es.osgeo.org</a><br>
> <a href="http://twitter.com/osgeoes" target="_blank">http://twitter.com/osgeoes</a><br>
_______________________________________________<br>
Spanish mailing list<br>
<a href="http://lists.osgeo.org/mailman/listinfo/spanish" target="_blank">http://lists.osgeo.org/mailman/listinfo/spanish</a><br>
<a href="http://es.osgeo.org" target="_blank">http://es.osgeo.org</a><br>
<a href="http://twitter.com/osgeoes" target="_blank">http://twitter.com/osgeoes</a></div></div></blockquote></div><br></div>