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

时间:2015-12-17 15:13:44

标签: amazon-ec2 ckan

我关注了installation guidedeployment 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并尝试使用公共IP地址(Amazon Elastic IP)和DNS地址。他们都没有工作。

ports.conflisten 8080(取出听80)

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

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

1 个答案:

答案 0 :(得分:0)

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

然而,通过8080访问CKAN只是为了测试apache部署是否正常工作,所以将它从外部提供是没有意义的 - 你可以通过ssh到框并使用curl来测试apache。

CKAN部署指令继续告诉您将nginx安装为反向代理,在正常端口80上暴露CKAN。