Forum Moderators: phranque

Message Too Old, No Replies

phppgAdmin forbidden

Setting up Windows/Apache/PHP/PostgreSQL stack, can't access phppgAdmin.

         

JAB Creations

9:07 pm on Nov 6, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm setting up a Windows/Apache/PHP/PostgreSQL stack with the latest stable x64 versions of each. With everything installed I've been trying to get phppgAdmin to work.

Stack directory...
C:\MEDIA\INTERNET\WAPP\

Apache...
C:\MEDIA\INTERNET\WAPP\Apache 2.4\

phppgAdmin...
C:\MEDIA\INTERNET\WAPP\phppgAdmin 5.1\

I went in to WAPP\Apache 2.4\conf\httpd.conf and added the following after all the other includes...

Include conf/extra/phppgadmin.conf


Right now in the phppgadmin.conf file I currently have...

Alias "/phppgadmin/" "C:/MEDIA/INTERNET/WAPP/phppgAdmin 5.1/"

<Directory "C:/MEDIA/INTERNET/WAPP/phppgAdmin 5.1/">
Order Deny,Allow
Allow from all
</Directory>



At this point I'm not sure what I'm doing wrong; I've tried several iterations of the phppgadmin config file's aias/directory. I've installed the 64 bit versions of Apache 2.4, PHP 5.6.3 and PostgreSQL 9.3. What am I missing?

John

phranque

1:52 am on Nov 7, 2014 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



when you request /phppgadmin/ what response do you get?

JAB Creations

5:07 am on Nov 7, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I get the generic Apache forbidden response page.

John

phranque

7:04 am on Nov 7, 2014 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



I would check for more specific clues in the web server error log file.

lucy24

10:48 am on Nov 7, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I would check for more specific clues in the web server error log file.

Would you find any? I have never seen anything beyond the generic "Client denied by server configuration". (If it were not 2:47 AM I would experiment with LogLevel debug on my own MAMP. But I kinda think it just makes all the other parts of the error log more verbose.)

<Directory "C:/MEDIA/INTERNET/WAPP/phppgAdmin 5.1/">
Order Deny,Allow
Allow from all
</Directory>

If you make up some other random html page-- or any browser-accessible file-- and put it in this directory, do you get the same 403 if you try to access it? The object is to home in on whether the lockout is directory-based or filename-based. I assume you have no trouble accessing other files in other directories, or you'd have said.

JAB Creations

9:13 am on Nov 9, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I finally had time to get to testing. I created a test.html file and got the same generic Apache HTTP 403 Forbidden error page. Thanks for the suggestion. The Apache error log spits out the following...

[Sun Nov 09 02:05:48.984602 2014] [authz_core:error] [pid 672:tid 1008] [client ::1:51300] AH01630: client denied by server configuration: C:/MEDIA/INTERNET/WAPP/phpPgAdmin-5.1/test.html


...and now I basically found some code that worked and minimized it. Apparently Apache 2.4 changes how things are handled but I was never a server person, I'm a web developer. Setting this up on my desktop now this is the minimal code I'm using to get this to work...

Alias /phppgadmin "C:/MEDIA/INTERNET/WAPP/phpPgAdmin-5.1/"

<Directory "C:/MEDIA/INTERNET/WAPP/phpPgAdmin-5.1/">
Options Indexes FollowSymLinks MultiViews
Require local
</Directory>


John

lucy24

11:19 am on Nov 9, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Brilliant.
I keep forgetting that 2.4 dislikes the Allow/Deny/Order business though it doesn't outright disallow them. (This will presumably come in 2.6.) So
Require local

is a terrific fix. At least until you move to the next stage of testing and you have to work out how to get into your live site ;)

JAB Creations

11:59 am on Nov 9, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



At least it works for the development server (my laptop) though I've read it may not allow outside access which would make it difficult though I won't get to that point until the server has been built by a tech I'm subcontracting under on a job until the end of the week at absolute earliest because apparently Crucial SSDs don't do RAID on 990FX /AMD SATA controllers...long, very long story. I'm actually tempted to create a tutorial of how to throw together a WAPPP server (Windows 7/Apache/PHP/PostgreSQL/phppgAdmin) here on the forums, if I have enough time though. My goal is to have all the latest stable versions because as I build my business I want to be directly involved on all levels, at least for a while.

John