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

Asked

Viewed 405 times

-1

I’m developing a web application using the Azure platform. I chose to use the Postgresql database with Postgis extension, because the application is summarized in a Webgis and Postgis is the one that best suits me. I’m using the Azure Webapp feature, where I have PHP as a language. I would like to know the best way for me to use the application and integrate it into that database.

Ps: I created an Ubuntu 14.04 Virtual Machine and installed Postgresql on it, but I don’t know how to do this integration, and the tests I tried didn’t work. Is this the best way? If yes how do I make this connection between the two resources.

Thank you!

  • We can only help if you show code. Your question is too wide.

  • The best way for me may be the worst way for you.

  • The problem was not the code itself, but the chosen infrastructure. I was unable to connect and free access to my virtual machine.

  • Thank you very much!

2 answers

2


I managed to solve my problem. I was creating the Webapp and the VM on 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 set up Postgresql, the acquisitions (pg_hba.conf and postgresql.conf), the end-ready ones freeing access to the port and also freeing the firewall for port 5432. Having done this, I was able to make the application talk to the bank through the pg_connect() function, connected to the DNS or IP of the machine cloud service, at the bank port (5432);

Thank you all!

  • Congratulations. Keep it up.

0

To make your life easier, there is in Azure Marktplace an already configured VM with all this: 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;

  • I saw that VM there. I hadn’t opted for it because of these other integrated tools that don’t fit my design and the platforms I’m using. But I managed to solve the problem. Thank you very much!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.