Ok...I think i´m getting it.

I originally only wanted to use my linux box for geoserver in tomcat and serve 
any webcontent through geoserver/data/www.
As always, things develop and if I am going add security and form interaction 
i´m going to have to add php to the whole bundle as well sometime.

I did think that I would able to keep my geoserver/data/www files separate from 
anything else on the server and that is what I mean about php having only one 
root directory for web content files. If I want to use php for any apps, then i 
will have to copy all php files into the apche root (/var/www) and not keep 
them 
in (var/lib/tomcat&webapps/geoserver/data/www)

I haven´t used apache to serve any web content yet, and have been using the 
geoserver/data/www directory to do this .So I didn´t have to worry about which 
directory is defined as the server root. In order to  use php I will have to 
copy my content out of geoserver/data/www and put it into apache´s var/www 
directory.

I think i´ll have to try it and see what happens.

thanks again for the infos.

Robert




________________________________
Von: Charles Galpin <[email protected]>
An: Robert Buckley <[email protected]>
CC: [email protected]
Gesendet: Mittwoch, den 9. März 2011, 18:28:50 Uhr
Betreff: Re: [Geoserver-users] enable php for geoserver document root

Yes. They don't work under /var/lib/tomcat6/webapps/geoserver/www  when using 
geoserver right? Alternatively you can configure apache to 
use /var/lib/tomcat6/webapps/geoserver/www as the document root. Either way, it 
would be apache httpd serving the php and not geoserver. 


Apache tomcat is a java application server and does not support php natively. 
You have to add support for it which allows it to run php but it is sub-optimal 
- apache httpd is better at this.

Apache httpd supports php (and lots of other things) natively and is very fast 
at it. It also serves static content much faster too. So you are better off 
using it. You can also make apache handle requests for other resources using 
mod 
proxy like I showed you, or using a connector to run the java stuff. 

You can go either way, but what I suggest should be good for you. From the 
outside (for openlayers say) everything comes from one URL so there are no 
sandbox restrictions, and you hide the actual details behind apache httpd.

I don't really understand your question about php having only one root. Apache 
only has one root, but with mod_rewrite you can play all kinds of smoke and 
mirror tricks.

charles


On Mar 9, 2011, at 11:37 AM, Robert Buckley wrote:

sorry for being dumb....but what you´re saying is that I should move my 
phpfiles 
from /var/lib/tomcat6/webapps/geoserver/www to the apache document root under 
/var/www/?
>
>...and php can only have one root?
>
>
>
>
________________________________
Von: Charles Galpin <[email protected]>
>An: Robert Buckley <[email protected]>
>CC: [email protected]
>Gesendet: Mittwoch, den 9. März 2011, 17:31:29 Uhr
>Betreff: Re: [Geoserver-users] enable php for geoserver document root
>
>No, you'll need to move your php from the geoserver www directory to somewhere 
>under your php root, but other than that it will work fine. 
>
>
>It looks like you can add php support to tomcat but I personally wouldn't do 
>this - apache httpd is much better suited for this,
>
>
>http://php-java-bridge.sourceforge.net/doc/tomcat6.php
>
>
>
>charles
>
>
>On Mar 9, 2011, at 11:04 AM, Robert Buckley wrote:
>
>Thanks for the reply,
>>
>>I have linux ubuntu server 10.04 running with tomcat6 on port 8080. Apache is 
>>on 
>>80 as default.
>>
>>I would like to keep the Apache webserver on 80 as other people will be using 
>>to 
>>to serve other content.
>>
>>I set up php to deal with apache at first and this works ok on  the 
>>domain:80. 
>>But I would also like to use php in some of my geoweb applications which are 
>>located in geoservers´ www document root.
>>
>>So...as far as I can understand your suggestion should work...
>>
>>
>>ProxyPass                 
>>/geoserver http://localhost:8080/geoserverProxyPassReverse 
>>/geoserver http://localhost:8080/geoserver
>>
>>thanks,
>>
>>Robert
>>
>>
>>
>>
>>
>>
________________________________

>>Von: Charles Galpin <[email protected]>
>>An: Robert Buckley <[email protected]>
>>CC: [email protected]
>>Gesendet: Mittwoch, den 9. März 2011, 14:44:55 Uhr
>>Betreff: Re: [Geoserver-users] enable php for geoserver document root
>>
>>Robert, you usually put apache httpd in front of geoserver/tomcat and use 
>>mod_proxy (and mod_proxy_http) or mod_jk to pass the geoserver URLs through 
>>to 
>>geoserver.
>>
>>
>>If for example you are running a standalone geoserver on port 8080 and apache 
>>on 
>>port 80, you could setup your apache virtual host to serve your php document 
>>root, but have this rule to proxy the geoserver requests using mod_proxy
>>
>>
>>ProxyPass                 /geoserver http://localhost:8080/geoserver
>>ProxyPassReverse /geoserver http://localhost:8080/geoserver
>>
>>
>>
>>You then access your geoserver 
>>with http://apachewithphproot/geoserver/foo/bar and your php 
>>with http://apachewithphproot/geoserver/your.php
>>
>>
>>I am using this and the only negative side effect I can see is that the layer 
>>preview doesn't work unless I access geoserver locally.
>>
>>
>>hth
>>charles
>>
>>
>>On Mar 9, 2011, at 5:56 AM, Robert Buckley wrote:
>>
>>Hi,
>>>
>>>Does anyone know how to enable php for the geoserver document root? As I 
>>>will be 
>>>developing from the geoserver root directory it is necessary to have php 
>>>enabled 
>>>/directed to this root directory as well. However php only works in the root 
>>>directory defined by apache2. How could I assign a second root for php?
>>>
>>>anyone done this before?
>>>Thanks for any help,
>>>
>>
>>------------------------------------------------------------------------------
>>Colocation vs. Managed Hosting
>>A question and answer guide to determining the best fit
>>for your organization - today and in the future.
>>http://p.sf.net/sfu/internap-sfd2d_______________________________________________
>>
>>Geoserver-users mailing list
>>[email protected]
>>https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>
>
>------------------------------------------------------------------------------
>Colocation vs. Managed Hosting
>A question and answer guide to determining the best fit
>for your organization - today and in the future.
>http://p.sf.net/sfu/internap-sfd2d_______________________________________________
>
>Geoserver-users mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/geoserver-users
>


------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to