How to integrate a Web Application with a PostGIS database? What is the best way?

-1

I'm developing a web application using the Azure platform. I chose to use the PostgreSQL database with PostGIS extension, because the application comes down to a WebGis and PostGis is the one that best suits me. I'm using Azure's WebApp feature, where I even have PHP as a language. I would like to know the best way for me to be able to use the application and integrate it into this database.

Ps: I created an Ubuntu Virtual Machine 14.04 and installed PostgreSQL on it, but I do not know how to do this integration, and the tests I tried did not work. Is this the best way? If so how do I make this connection between the two resources.

Thank you!

    
asked by anonymous 09.08.2016 / 21:41

2 answers

2

I was able to solve my problem. I was creating WebApp and VM in different networks and resource groups. I then created a new virtual machine (Windows Server 8) and a new resource group, putting the application in the same place. I configured Postgresql, the files (pg_hba.conf and postgresql.conf), the endpoints freeing access to the port and also freeing the firewall for port 5432. This enabled me to make the application talk to the database through the pg_connect () function, connected to the DNS or IP of the cloud service of the machine, at the port of the bank (5432);

Thank you all!

    
11.08.2016 / 23:17
0

To make your life easier, there's a VM in Azure Marktplace already configured: OpenGeo Suite .

  • Manage and store data reliably with PostGIS
  • Publish maps and data from a variety of formats and sources with GeoServer
  • Build flexible user interfaces and custom workflows in the browser with
  • OpenLayers
  • Analyze and publish geospatial data on the desktop with QGIS
  • Access and edit data using open standards from top to bottom, including OGC standards like WMS, WFS, WCS, and others.

For more information, visit official website ;

    
10.08.2016 / 11:42