[postgis-users]CONNECTION to database thru Mapserver

Doug_Newcomb at fws.gov Doug_Newcomb at fws.gov
Mon Mar 14 08:58:16 PST 2005


>From what I recall in the mapserver docs, you need to have a real IP
address designated for the postgresql server ( set in postgresql.conf) and
use that ip address in the map file,
in postgresql.conf:
listen addresses='192.168.0.100'

 you also have to adjust pg_hba.conf to allow connections from
192.168.0.100

in mapfile
 CONNECTION "user=test password=test dbname=MyDataBase  host=192.168.0.100"

I'm not sure if the localhost 127.0.0.1 would do.


Make sure to adjust your firewall to prevent outside machines from
connecting to port 5432 ( postgresql).  This is not blocked by default on
many linux distributions.

Doug

Doug Newcomb
USFWS
Raleigh, NC
919-856-4520 ext. 14 doug_newcomb at fws.gov
---------------------------------------------------------------------------------------------------------

The opinions I express are my own and are not representative of the
official policy of the U.S.Fish and Wildlife Service or Dept. of Interior.
I left my signature file in /dev/null


|---------+--------------------------------------------->
|         |           strk at refractions.net              |
|         |           Sent by:                          |
|         |           postgis-users-bounces at postgis.refr|
|         |           actions.net                       |
|         |                                             |
|         |                                             |
|         |           03/14/2005 11:23 AM               |
|         |           Please respond to PostGIS Users   |
|         |           Discussion                        |
|         |                                             |
|---------+--------------------------------------------->
  >---------------------------------------------------------------------------------------------|
  |                                                                                             |
  |        To:      postgis <postgis-users at postgis.refractions.net>                             |
  |        cc:                                                                                  |
  |        Subject: Re: [postgis-users]CONNECTION to database thru Mapserver                    |
  >---------------------------------------------------------------------------------------------|




On Mon, Mar 14, 2005 at 08:20:55AM -0800, w m wrote:
> Hi,
> I created a Mapserver layer definition in order to establish a connection
to my database. I would like to display the data from the database on my
map.
> The table spots has just points in the "the_geom" column. All I want to
do is to display those points on the map.  When I write my layer
definition, it gives me no errors but it also doesnt display those points
on the map.
>
> Here is my layer definition:
>
> LAYER
>         CONNECTIONTYPE postgis
>         NAME "Spots"  # my table name
>         CONNECTION "user=test password=test dbname=MyDataBase
host=http://localhost"

host=localhost
also, try adding a SIZE to your class
--strk;

>         DATA "the_geom FROM Spots"   # the_geom column from table Spots
>         STATUS ON
>         TYPE POINT
>                 CLASS
>                         COLOR 0 0 0
>                         OUTLINECOLOR 0 0 0
>                 END
> END
>
> Thank You
> Wokar
>
>
> ---------------------------------
> Do you Yahoo!?
>  Yahoo! Small Business - Try our new resources site!
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users








More information about the postgis-users mailing list