Dokuwiki Proxy: Could not connect Permission denie

2019-07-25 18:33发布

Dokuwiki responses with

Could not connect to <proxy> Permission denied (13)

when I try to use the Wiki Upgrade Plugin. Also the Extension Manager prints

The plugin repository could not be contacted. Make sure your server is
allowed to contact www.dokuwiki.org and check your proxy settings. [Retry]

I'm sure that the proxy settings are correct.

If I try to access www.dokuwiki.org with curl

curl https://download.dokuwiki.org -L

or wget

wget https://www.dokuwiki.org
--2016-11-15 15:13:08--  https://www.dokuwiki.org/
Connecting to <proxy:port>... connected.
Proxy request sent, awaiting response... 302 Moved Temporarily
Location: https://www.dokuwiki.org/dokuwiki# [following]
--2016-11-15 15:13:08--  https://www.dokuwiki.org/dokuwiki
Connecting to <proxy:port>... connected.
Proxy request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘index.html’

[ <=>            ] 25,784      --.-K/s   in 0.02s

2016-11-15 15:13:08 (1.38 MB/s) - ‘index.html’ saved [25784]

in the console I have no problem.

I have no idea what I could do to find the problem.

  • CentOS Linux release 7.2.1511 (Core)
  • Dokuwiki Release 2016-06-26a "Elenor of Tsort"

2条回答
The star\"
2楼-- · 2019-07-25 19:01

The Reason

SELinux is preventing the apache-httpd process to access the network. You have to allow the daemon access to use the Dokuwiki uprade features.

The Fix

Check the settings with:

 getsebool -a | grep httpd_can_network_connect

I got:

 httpd_can_network_connect --> off
 httpd_can_network_connect_cobbler --> off
 httpd_can_network_connect_db --> off

With:

setsebool -P httpd_can_network_connect on

you switch the network access for the httpd process on. (I had to install policycoreutils-python first, rpm -qa | grep selinux shows if you already have it.)

Warning!

I am not familiar with SELinux (yet) and there may be side effects to this change that compromise the security of your system!

Found the solution with help from unix.stackexchange.com

查看更多
Summer. ? 凉城
3楼-- · 2019-07-25 19:06

You still can use 'Manual Install' tab to install plugins, it is not a real obstacle. Manual update procedure is not complicated as well.

  1. Is doku running under the same user you are checking in console?
  2. Have you checked proxy settings in Admin -> Configuration Settings -> DokuWiki\Network?
查看更多
登录 后发表回答