2017-05-31 68 views
0

我可以訪問我的Postgres數據庫中phpPgAdmin的與http://localhost/phppgadmin/沒有權限訪問/ phpPgAdmin的/這臺服務器

但是當我嘗試在phpPgAdmin的打開我的數據庫,我的IP地址http://10.128.0.128/phppgadmin/它不能繼續工作時:

Forbidden 

You don't have permission to access /phppgadmin/ on this server. 

Apache/2.4.7 (Ubuntu) Server at 10.128.0.128 Port 80 

有沒有人可以解決我的問題?謝謝。

我editted phpPgAdmin的文件到:

DirectoryIndex index.php 
AllowOverride None 

order deny,allow 
deny from all 
allow from 10.128.0.128/255.0.0.0 ::1/128 
allow from all 

但它仍然無法正常工作....

回答

0

你有沒有登錄爲root用戶 時,你是不是會發生正常root用戶

+0

我用'Postgres的對於Postgres用戶 – adn

+0

的/etc/apache2/conf.d/phppgadmin .conf配置文件默認情況下允許任何人訪問PhpPgAdmin而不是localhost。 添加一條線,使一個新的能夠爲你的IP規則,所以它看起來是這樣的: <位置/ phpPgAdmin的> 訂單拒絕,允許 所有 拒絕允許來自[您的客戶端IP] –

0

/etc/apache2/conf.d/phppgadmin.conf配置文件默認情況下允許除localhost之外的任何人訪問PhpPgAdmin。

添加一條線,讓您的IP一個新的允許規則,所以它看起來是這樣的:

<Location /phppgadmin> 
    Order deny,allow 
    Deny from all 
    Allow from [Your client IP] 
</Location> 
+0

我已經編輯了phppgadmin文件,但它仍然不起作用。有沒有解決方法?謝謝 – adn

相關問題