首页 > 解决方案 > 在 Ubuntu 16.04 LTS 上使用 pgadmin4.15 和 apache 时出现内部服务器错误

问题描述

我几乎按照这篇文章进行了设置,pgadmin 4ubuntu 16.04跳过了安装的第一步PostgreSql,因为我想使用 AWS RDS。但是当我尝试启动时http://myipaddress/pgadmin4/,我得到了500 Internal Server Error. http://myipaddress确实让我进入了Apache2 Ubuntu Default Page,但不确定我缺少什么配置。

我也遵循了这一点并添加了建议的修复程序,但它对我不起作用。

这是error.log

[wsgi:warn] [pid 19605:tid 140528707069824] mod_wsgi: Compiled for Python/3.5.1+.  
[wsgi:warn] [pid 19605:tid 140528707069824] mod_wsgi: Runtime using Python/3.5.2.  
[mpm_event:notice] [pid 19605:tid 140528707069824] AH00489: Apache/2.4.18 (Ubuntu) mod_wsgi/4.3.0 Python/3.5.2 configured -- resuming normal operations  
[core:notice] [pid 19605:tid 140528707069824] AH00094: Command line: '/usr/sbin/apache2'  
[wsgi:error] [pid 19608:tid 140528601200384] [remote 8.28.16.254:0] mod_wsgi (pid=19608): Exception occurred processing WSGI script '/usr/share/pgadmin4/web/pgAdmin4.wsgi'.  
[wsgi:error] [pid 19608:tid 140528601200384] [remote 8.28.16.254:0] Traceback (most recent call last):  
[wsgi:error] [pid 19608:tid 140528601200384] [remote 8.28.16.254:0]   File "/usr/lib/python3/dist-packages/flask/app.py", line 1836, in __call__  
[wsgi:error] [pid 19608:tid 140528601200384] [remote 8.28.16.254:0]     return self.wsgi_app(environ, start_response)  
[wsgi:error] [pid 19608:tid 140528601200384] [remote 8.28.16.254:0]   File "/usr/share/pgadmin4/web/pgAdmin4.py", line 95, in __call__  
[pid 19608:tid 140528601200384] [remote 8.28.16.254:0]     return self.app(environ, start_response)  
[wsgi:error] [pid 19608:tid 140528601200384] [remote 8.28.16.254:0] AttributeError: 'ReverseProxied' object has no attribute 'app'

标签: pythonapacheubuntupgadmin-4

解决方案


我没有+符号。由于某种原因,我的缩进搞砸了。一旦我修复它,它就可以正常工作。

  File "/usr/share/pgadmin4/web/pgAdmin4.py", line 83
    except ImportError:
                      ^
IndentationError: unindent does not match any outer indentation level

推荐阅读