我已經在Ubuntu服務器中安裝了phppgadmin,並且想從另一臺計算機訪問它。從另一臺計算機訪問phppgadmin?
它說,訪問被拒絕,當我輸入:
http://<ip>/phppgadmin
端口5432在Ubuntu服務器,但只爲本地IP打開。
謝謝
我已經在Ubuntu服務器中安裝了phppgadmin,並且想從另一臺計算機訪問它。從另一臺計算機訪問phppgadmin?
它說,訪問被拒絕,當我輸入:
http://<ip>/phppgadmin
端口5432在Ubuntu服務器,但只爲本地IP打開。
謝謝
默認/etc/apache2/conf.d/phppgadmin.conf配置文件保存任何人,但本地主機訪問phpPgAdmin的。
添加一條線,讓您的IP一個新的允許規則,所以它看起來是這樣的:
<Location /phppgadmin>
Order deny,allow
Deny from all
Allow from [Your client IP]
</Location>
順便說一句,這種問題可能是更適合於計算器的姊妹網站serverfault.com
您是否正在運行Apache?
您需要更改您的權限在httpd.conf文件或的.htaccess
這是一個Apache(或Web服務器)的問題。你是phppgadmin目錄有一個.htaccess文件禁止除localhost以外的所有人。
你需要將它設置爲允許所有或允許(此處插入IP)
我知道這是一個老問題,但因爲我偶然發現它試圖修復「無法加載資源:服務器響應狀態403(禁止)」錯誤,同時嘗試從另一臺計算機訪問phpPgAdmin和給出的答案沒有爲我工作,我想分享我的解決方案。
Ubuntu:17.04; phpPgAdmin的:5.1
解決方案: 註釋出在/etc/apache2/conf-enabled/phppgadmin.conf需要本地和重新啓動Apache(須藤服務apache2的重裝)
<Directory /usr/share/phppgadmin>
<IfModule mod_dir.c>
DirectoryIndex index.php
</IfModule>
AllowOverride None
# Only allow connections from localhost:
# Require local
<IfModule mod_php.c>
php_flag magic_quotes_gpc Off
php_flag track_vars On
#php_value include_path .
</IfModule>
<IfModule !mod_php.c>
<IfModule mod_actions.c>
<IfModule mod_cgi.c>
AddType application/x-httpd-php .php
Action application/x-httpd-php /cgi-bin/php
</IfModule>
<IfModule mod_cgid.c>
AddType application/x-httpd-php .php
Action application/x-httpd-php /cgi-bin/php
</IfModule>
</IfModule>
</IfModule>
</Directory>
的/ etc/apache2的/ conf-enabled/phppgadmin.conf
感謝您的回答。它爲我節省了大量的時間:) 你值得擁有另一張票... – itsols 2012-10-28 05:42:37
你必須重新啓動Apache服務器,直到你不能訪問你所做的更改 sudo service apache2 start – 2017-07-06 08:27:09