pgadmin4 上的 403 Forbbiten 错误

pgadmin4 上的 403 Forbbiten 错误

我按照这里的教程“如何在服务器模式下安装和配置 pgAdmin 4”一切都很好,只有当我在浏览器中调用我的服务器 IP,出现 403 Forbbiten 错误。

我的 /etc/apache2/sites-avaliable/pgadmin4.conf 是:

服务器名称 1.1.2.1

WSGIDaemonProcess pgadmin processes=1 threads=25 python-home=/home/firm/environments/my_env
WSGIScriptAlias / /home/firm/environments/my_env/lib/python3.5/site-packages/pgadmin4/pgAdmin4.wsgi

<Directory "/home/firm/environments/my_env/lib/python3.5/site-packages/pgadmin4/">
    WSGIProcessGroup pgadmin
    WSGIApplicationGroup %{GLOBAL}
    Require all granted
</Directory>

我的 /etc/apache2/apache2.conf 是:

ServerName localhost
Mutex file:${APACHE_LOCK_DIR} default

PidFile ${APACHE_PID_FILE}

Timeout 300

KeepAlive On

MaxKeepAliveRequests 100

KeepAliveTimeout 5
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
HostnameLookups Off

ErrorLog ${APACHE_LOG_DIR}/error.log

LogLevel warn

# Include module configuration:
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf

Include ports.conf

<Directory />
        Options FollowSymLinks
        AllowOverride None
        Require all denied
</Directory>

<Directory /usr/share>
        AllowOverride None
        Require all granted
</Directory>

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>

AccessFileName .htaccess

<FilesMatch "^\.ht">
        Require all denied
</FilesMatch>

LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

# Include of directories ignores editors' and dpkg's backup files,
# see README.Debian for details.

# Include generic snippets of statements
IncludeOptional conf-enabled/*.conf

# Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf

相关内容