根据API伞状指南,我在Ubuntu14.04服务器上安装了快速入门。在修改/etc/api-伞/api-umbrella.yml并启动api-伞服务器后,我无法访问浏览器中它的主页。
我检查了服务器的防火墙。端口80和443都为传入请求打开。
当使用curl umbrella.my.website访问时(其中的"umbrella.my.website“是运行API-伞服务的服务器),我得到了以下结果:
{
"error": {
"code": "NOT_FOUND",
"message": "The requested URL was not found on this server."
}
}怎样才能得到像下面的图片这样的主页
浏览到您服务器的主机名。您应该登陆默认主页:
在文件里?
服务器上的配置文件“/etc/api-伞/api-umbrella.yml”:
# services:
# - general_db
# - log_db
# - router
# - web
web:
admin:
initial_superusers:
- leo@newfairs.com
# auth_strategies:
# enabled:
# - github
# - google
# - persona
# github:
# client_id:
# client_secret:
# google:
# client_id:
# client_secret:
# elasticsearch:
# hosts:
# - http://127.0.0.1:14002
# mongodb:
# url: mongodb://127.0.0.1:14001/api_umbrella
# nginx:
# workers: 4
# gatekeeper:
# workers: 4通过停止和启动端口80验证了api-伞式服务器正在使用它:
$ sudo /etc/init.d/api-umbrella stop
* Stopping API Umbrella api-umbrella
...done.
$ sudo netstat -lnput|grep :80
$ sudo /etc/init.d/api-umbrella start
* Starting API Umbrella api-umbrella
...done.
$ sudo netstat -lnput|grep :80
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 17077/router.conf
tcp6 0 0 :::80 :::* LISTEN 17077/router.conf发布于 2016-08-03 17:50:24
您并不是唯一的-- https://github.com/NREL/api-umbrella/issues/263其他人在基于不同操作系统的基础上经历过类似的问题。
https://stackoverflow.com/questions/35573853
复制相似问题