mercredi 3 décembre 2014

Logging in to phppgadmin remotely Ubuntu 14.04 Amazon EC2


I created an Ubuntu server instance on Amazon EC2 and installed php, postgreSQL, phppgadmin, and any other required features.


After SSH'ing into the server using command prompt, I executed the following operations:



'sudo apt-get update'
'sudo apt-get install apache2 libapache2-mod-php5 php5'
'sudo apt-get install postgresql postgresql-contrib'
'sudo apt-get update'
'sudo apt-get install phppgadmin'

'sudo nano /etc/apache2/conf.d/phppgadmin'
- uncomment line 'allow from all', save and exit

'sudo nano /etc/apache2/sites-enabled/000-default'
add the following text:

<Directory "/usr/share/phppgadmin">
AuthUserFile /etc/phppgadmin/.htpasswd
AuthName "Restricted Area"
AuthType Basic
require valid-user
</Directory>

- save and exit

'sudo apt-get install apache2-utils'

'sudo service apache2 restart'

'sudo cp /etc/apache2/conf.d/phppgadmin /etc/apache2/conf-enabled/phppgadmin.conf'
'sudo service apache2 restart


The result: http://ift.tt/1yPWZ6b


My issue now is that I don't know what to do so that I can access phppgadmin and start creating a database. A tutorial explained how to setup a password to access the page that was linked to above, but this did not work because as you can see, the page is accessible without a password.


My questions:


1) It is an issue (in terms of security) that there is no password to access the page that I linked to? If so, how can I fix this?


2) How can I gain access to phppgadmin after I click on the 'PostgreSQL' link in the sidebar that shows a container with a red X on it? I have searched and searched and I can't figure out how to setup a user or access it as an administrator/root/postgres user





Aucun commentaire:

Enregistrer un commentaire