{"id":147,"date":"2019-06-02T23:30:26","date_gmt":"2019-06-02T22:30:26","guid":{"rendered":"https:\/\/blog.inplico.uk\/?p=147"},"modified":"2019-08-03T11:49:53","modified_gmt":"2019-08-03T10:49:53","slug":"phppgadmin","status":"publish","type":"post","link":"https:\/\/blog.inplico.uk\/?p=147","title":{"rendered":"PHPPgadmin"},"content":{"rendered":"<p>phppgadmin is installed in <strong>\/usr\/share\/phppgadmin<\/strong>. You will need to create a site file in \/etc\/apache2\/sites-available and enable it in order to access phppgadmin. You will also have to set up dns accordingly. The file should look something like this<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-theme=\"twilight\">&lt;VirtualHost&gt; *:80&gt;\r\n    ServerName pgadmin.caa.intrasec.net Redirect \"\/\"\r\n    https:\/\/pgadmin.caa.intrasec.net\r\n&lt;\/VirtualHost&gt;\r\n&lt;IfModule mod_ssl.c&gt;\r\n    &lt;VirtualHost _default_:443&gt;\r\n        Servername pgadmin.caa.intrasec.net\r\n        ServerAdmin tim@jtek.co.uk\r\n        DocumentRoot \/usr\/share\/phppgadmin\r\n        ErrorLog ${APACHE_LOG_DIR}\/error.log\r\n        CustomLog ${APACHE_LOG_DIR}\/access.log combined\r\n        SSLEngine on\r\n        SSLCertificateFile \/etc\/ssl\/certs\/mail-caa.pem\r\n        SSLCertificateKeyFile \/etc\/ssl\/private\/mail-caa.key\r\n        &lt;FilesMatch \"\\.(cgi|shtml|phtml|php)$\"&gt;\r\n            SSLOptions +StdEnvVars\r\n        &lt;\/FilesMatch&gt;\r\n        &lt;Directory \/usr\/lib\/cgi-bin&gt;\r\n            SSLOptions +StdEnvVars\r\n            DirectoryIndex index.php index.html\r\n            AllowOverride None\r\n            Require all granted\r\n            AcceptPathInfo On\r\n        &lt;\/Directory&gt;\r\n        &lt;Location \"\/\"&gt;\r\n            Require all granted\r\n        &lt;\/Location&gt;\r\n        BrowserMatch \"MSIE [2-6]\" \\ \u00a0\u00a0\u00a0\u00a0nokeepalive ssl-unclean-shutdown \\ downgrade-1.0 force-response-1.0\r\n        BrowserMatch \"MSIE [17-9]\" ssl-unclean-shutdown\r\n    &lt;\/VirtualHost&gt;\r\n&lt;\/IfModule&gt;<\/pre>\n<p>You will need to change the server name, SSLCertificateFile, SSLCertificateKeyFile and Redirect to match your configuration.<\/p>\n<p>Don\u2019t forget that the file name needs to end in \u201c<strong>.conf<\/strong>\u201d otherwise the \u201ca2ensite\u201d script will not work.\u00a0 If you installed the Debian packaged version then you will also need to disable the phppgadmin conf that it automatically creates:<\/p>\n<p><code class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"rowhammer\">#a2disconf phppgadmin<\/code><\/p>\n<p>You might want to create a superuser that can log on to phppgadmin. To do so run<\/p>\n<p><code class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"rowhammer\">#createuser NewUserName -U postgres -DRsP<\/code><\/p>\n<p>Note that for security reasons phppgadmin expressly forbids the built in postgres user from logging on.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>phppgadmin is installed in \/usr\/share\/phppgadmin. You will need to create a site file in \/etc\/apache2\/sites-available and enable it in order to access phppgadmin. You will also have to set up dns accordingly. The file should look something like this &lt;VirtualHost&gt; *:80&gt; ServerName pgadmin.caa.intrasec.net Redirect &#8220;\/&#8221; https:\/\/pgadmin.caa.intrasec.net &lt;\/VirtualHost&gt; &lt;IfModule mod_ssl.c&gt; &lt;VirtualHost _default_:443&gt; Servername pgadmin.caa.intrasec.net ServerAdmin tim@jtek.co.uk [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-147","post","type-post","status-publish","format-standard","hentry","category-debian-server"],"_links":{"self":[{"href":"https:\/\/blog.inplico.uk\/index.php?rest_route=\/wp\/v2\/posts\/147","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.inplico.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.inplico.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.inplico.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.inplico.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=147"}],"version-history":[{"count":13,"href":"https:\/\/blog.inplico.uk\/index.php?rest_route=\/wp\/v2\/posts\/147\/revisions"}],"predecessor-version":[{"id":197,"href":"https:\/\/blog.inplico.uk\/index.php?rest_route=\/wp\/v2\/posts\/147\/revisions\/197"}],"wp:attachment":[{"href":"https:\/\/blog.inplico.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=147"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.inplico.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=147"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.inplico.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=147"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}