无法访问我在 Amazon EC2 上安装的 CKAN

Can't access my CKAN installation on Amazon EC2

我关注了 installation guide and deployment guide,我可以访问 CKAN 站点,但是在端口 5000 上,而不是在 8080 上。

我做错了什么?

--edit1-- 错误日志。
/var/log/apache2/ckan_default.error.log 为空。
/var/log/apache2/error.log 下面:

[Wed Dec 16 03:56:05.341055 2015] [core:notice] [pid 31625] AH00094: Command line: '/usr/sbin/apache2'
[Wed Dec 16 05:25:00.457734 2015] [:error] [pid 32024] [client 188.68.224.62:59132] script '/var/www/html/wp/httptest.php' not found or unable to stat
[Wed Dec 16 06:46:59.218607 2015] [mpm_prefork:notice] [pid 31625] AH00171: Graceful restart requested, doing restart
[Wed Dec 16 06:46:59.367788 2015] [mpm_prefork:notice] [pid 31625] AH00163: Apache/2.4.7 (Ubuntu) mod_wsgi/3.4 Python/2.7.6 configured -- resuming normal operations
[Wed Dec 16 06:46:59.367809 2015] [core:notice] [pid 31625] AH00094: Command line: '/usr/sbin/apache2'
[Wed Dec 16 06:54:00.009154 2015] [:error] [pid 966] [client 188.68.224.62:40707] script '/var/www/html/wp/httptest.php' not found or unable to stat
[Wed Dec 16 13:07:30.925196 2015] [mpm_prefork:notice] [pid 31625] AH00171: Graceful restart requested, doing restart

--edit2-- 将所有内容改回部署指南中所说的内容。
/etc/apache2/sites-available/ckan_default.conf 下面

<VirtualHost 127.0.0.1:8080>
    ServerName ec2-xx-xx-xx-xx.ap-southeast-2.compute.amazonaws.com
    ServerAlias www.ec2-xx-xx-xx-xx.ap-southeast-2.compute.amazonaws.com
    WSGIScriptAlias / /etc/ckan/default/apache.wsgi

    # Pass authorization info on (needed for rest api).
    WSGIPassAuthorization On

    # Deploy as a daemon (avoids conflicts between CKAN instances).
    WSGIDaemonProcess ckan_default display-name=ckan_default processes=2 threads=15

    WSGIProcessGroup ckan_default

    ErrorLog /var/log/apache2/ckan_default.error.log
    CustomLog /var/log/apache2/ckan_default.custom.log combined
    LogLevel info

    <IfModule mod_rpaf.c>
        RPAFenable On
        RPAFsethostname On
        RPAFproxy_ips 127.0.0.1
    </IfModule>

    <Directory />
        Require all granted
    </Directory>
</VirtualHost>

还尝试将 127.0.0.1:8080 更改为 *:8080 并尝试 public IP 地址(亚马逊弹性 IP)和 DNS 地址。 None 他们工作。

ports.conflisten 8080(取出听80)

wsgi 脚本和 nginx 配置也如指南中所述。

我在 Firefox 上看到“问题加载页面”访问端口 80 上的根 url 但访问 8080 只是挂起并且两者都没有 HTTP 响应。我仍然可以在端口 5000 上访问 CKAN。

Amazon EC2 默认不允许连接到端口 8080,因此如果您确实想从外部访问它,可以打开该端口。

然而,通过 8080 访问 CKAN 仅用于测试 apache 部署是否正常工作,因此使其在外部可用是没有意义的 - 您可以通过 ssh-ing 到盒子并使用 curl 来测试 apache 是否正常工作.

CKAN 部署说明继续告诉您安装 nginx 作为反向代理,在正常端口 80 上公开 CKAN。