【发布时间】:2016-01-06 01:38:52
【问题描述】:
我关注了installation guide 和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 并尝试了公共 IP 地址(Amazon Elastic IP)和 DNS 地址。它们都不起作用。
ports.conf有listen 8080(取出听80)
wsgi 脚本和 nginx 配置也如指南中所述。
我在 Firefox 上看到“问题加载页面”访问端口 80 上的根 url,但访问 8080 只是挂起并且两者都没有 HTTP 响应。我仍然可以在 5000 端口访问 CKAN。
【问题讨论】:
-
部署未成功。文档说:通常,如果它不起作用,请查看 /var/log/apache2 中的日志文件以获取错误消息。 ckan_default.error.log 应该特别有趣。
-
感谢@DRead 的评论。 CKAN 错误日志为空。我的问题中添加了 Apache 错误日志。那里有什么有趣的吗?
-
那里有wordpress 吗?也许您配置了另一个 apache 站点,它正在获取所有请求。我认为是 apache 问题,而不是 ckan 问题。
-
@DRead 是的,Wordpress 也在那里,但是在我将 Wordpress 放在那里之前,无法在端口 8080 访问但在 5000 的 ckan 问题是相同的。为 wordpress 安装所做的所有更改是在 apache ports.conf 文件中添加 listen 80 - 这使得 wordpress 在端口 80 可访问,ckan 在端口 5000。
-
您在本地计算机上使用浏览器?您说亚马逊不允许连接到端口 8080。请尝试使用盒子本身的 curl 来确认这是问题所在。
标签: amazon-ec2 ckan