Rather than serve your entire data dir through Apache, I think it would be
better to serve just the www/ directory - no need to put up your
configuration files complete with database passwords. You could then use
Apache's mod_proxy like:
Alias /geoserver/www/ /var/www/mydomain/htdocs/
ProxyPass /geoserver http://localhost:8080/geoserver
That should keep the relative paths the same so your JavaScript application
should not even see the difference (I haven't tried this personally so I may
have botched the configuration above, but I hope you get the general idea.)
Then you can enable PHP for the htdocs directory.
--
David Winslow
OpenGeo - http://opengeo.org/
On Thu, Jun 30, 2011 at 8:16 AM, Charles Galpin <[email protected]> wrote:
> For your javascript to work, everything needs to use the same host and port
> so you want to proxy geoserver through apache. Enable mod_proxy and use
> something like this in your virtualhost
>
> ProxyPass /geoserver http://localhost:8080/geoserver
> ProxyPassReverse /geoserver http://localhost:8080/geoserver
>
> And then do all your access via http://yourdomain/geoserver
>
> hth
> charles
>
> On Jun 30, 2011, at 8:09 AM, Robert Buckley wrote:
>
> Hi,
>
> I have successfully installed geoserver 2.1.1 and everything works at first
> glance ok.
>
> I am still unsure about the apache2 installation though...i.e
>
> 1. first try to install apache2 and see what happens and If apache2 works
> on port 80 and geoserver still works on 8080 breath out again!!
> 2. install php to work with apache on port 80
> 3. move the geoserver data_dir into the apache2 document root directory
>
> If apache serves on port 80, and my GEOSERVER_DATA_DIR is in apache2´s root
> directory so that I can use php on my web apps, how can all this work
> together with geoserver serving data through port 8080??
>
> I´m rather confused.
>
> Rob
>
>
> ------------------------------
> *Von:* Charles Galpin <[email protected]>
> *An:* Robert Buckley <[email protected]>
> *CC:* [email protected]
> *Gesendet:* Donnerstag, den 30. Juni 2011, 13:34:16 Uhr
> *Betreff:* Re: [Geoserver-users] Help needed to reorganise my geoserver
> setup
>
> It's probably clear from your other thread now that as long as you make a
> backup of the data dir you can't go wrong, and what you describe looks fine.
> I recommend switching to the .war version and deploy it under tomcat if you
> are prepping for production use as well.
>
> charles
>
> On Jun 30, 2011, at 3:00 AM, Robert Buckley wrote:
>
> Hi,
>
> I currently have the following set up.
>
> Linux Ubuntu 10.04
> Tomcat6
> Geoserver 2.0.2
> Postgresql + postgis
>
> The geoserver_data_dir is contained within Tomcat6/webapps/geoserver/data
>
> I am using the built in jetty server to serve the geoserver data.
>
> I would like to do the following:
>
> 1. Install Apache2
> 2. Install PHP
> 3. Install the new version of geoserver (2.1.x)
> 4. move the geoserver_data_dir into the Apache2 DocumentRoot in order to
> enable php in my webapps.
>
> My approach would be this...
>
> 1. first try to install apache2 and see what happens and If apache2 works
> on port 80 and geoserver still works on 8080 breath out again!!
> 2. install php to work with apache on port 80
> 3. try to move the geoserver data_dir into the apache2 document root
> directory
> 4. undeploy geoserver 2.0.2 in tomcat6 then deploy geoserver 2.1.x
>
> Could anyone advise me on the best way to do this without destroying
> everything I have done in the past 2 years?
>
>
> thanks,
>
> Robert
>
>
>
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
>
> http://p.sf.net/sfu/splunk-d2d-c2_______________________________________________
> Geoserver-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
>
>
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> _______________________________________________
> Geoserver-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users