# The url used to vist this web site.
URL=http://118.25.79.194:8888
# The default interface language. See translate.getoutline.com for a list of
# available language codes and their rough percentage translated.
DEFAULT_LANGUAGE=zh_CN
# https://docs.djangoproject.com/en/2.2/ref/settings/#language-code
LANGUAGE_CODE=en_US
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
TIME_ZONE=UTC
FORCE_HTTPS=false
# The domain in you email.
# Comma separated list of domains to be allowed (optional).
# If not set, the first user's domain is allowed by default.
ALLOWED_DOMAINS=
# Nginx
# The nginx bind ip and port.
# If you use ip address to access outline, this ip and port should be same as the URL.
# If this server behind a proxy(nginx), you can bind to `127.0.0.1`.
HTTP_IP=0.0.0.0
HTTP_PORT_IP=8888
# Docker
# If you server behind a proxy(nginx), and the proxy created by docker. You can use the proxy's network. Set the `NETWORKS` to proxy's network name, and set `NETWORKS_EXTERNAL` to `true` .
# The sample config for host nginx can be find in `config/sample/nginx_outline.conf`.
NETWORKS=outlinewiki
NETWORKS_EXTERNAL=false
# Secret keys, update by script.
# You shouldn't edit it.
MINIO_ACCESS_KEY=25cbd8fef14df517
MINIO_SECRET_KEY=e96cb9fe938768c87fcea1429198d94c38418ddf51770f518c88c786d8338135
OIDC_CLIENT_SECRET=e96cb9fe938768c87fcea1429198d94c38418ddf51770f518c88c786d8338135
OUTLINE_SECRET_KEY=8bba7dbc5cb45b7a0cd879b3c06ed17ff3b642be9fdea7db00bd0c2b9ecbd1e3
OUTLINE_UTILS_SECRET=68f6e7eb8cb84922de50ebe615de8463e90d35e3e104ce91765de533487e3ced
DJANGO_SECRET_KEY=b6f9599e3be93619f9caacf8f7090170ab7fc9de6f8b4ec7d56b6a2217ad2da0
使用make logs查看日志,有如下关键警告日志:
{"error":"State not return in OAuth flow","stack":"BadRequestError: State not return in OAuth flow\n at OAuthStateMismatchError (/opt/outline/build/server/errors.js:99:34)\n at StateStore.verify (/opt/outline/build/server/utils/passport.js:43:61)\n at OAuth2Strategy.authenticate (/opt/outline/node_modules/passport-oauth2/lib/strategy.js:222:26)\n at attempt (/opt/outline/node_modules/passport/lib/middleware/authenticate.js:366:16)\n at authenticate (/opt/outline/node_modules/passport/lib/middleware/authenticate.js:367:7)\n at /opt/outline/node_modules/@outlinewiki/koa-passport/lib/framework/koa.js:194:7\n at new Promise ()\n at /opt/outline/node_modules/@outlinewiki/koa-passport/lib/framework/koa.js:193:12\n at /opt/outline/node_modules/@outlinewiki/koa-passport/lib/framework/koa.js:143:7\n at new Promise ()\n at passportAuthenticate (/opt/outline/node_modules/@outlinewiki/koa-passport/lib/framework/koa.js:107:15)\n at passportMiddleware (/opt/outline/build/server/middlewares/passport.js:66:7)\n at dispatch (/opt/outline/node_modules/koa-compose/index.js:44:32)\n at next (/opt/outline/node_modules/koa-compose/index.js:45:18)\n at /opt/outline/node_modules/koa-router/lib/router.js:321:16\n at dispatch (/opt/outline/node_modules/koa-compose/index.js:44:32)\n at next (/opt/outline/node_modules/koa-compose/index.js:45:18)\n at methodOverrideMiddleware (/opt/outline/build/server/middlewares/methodOverride.js:22:12)\n at dispatch (/opt/outline/node_modules/koa-compose/index.js:44:32)\n at next (/opt/outline/node_modules/koa-compose/index.js:45:18)\n at /opt/outline/node_modules/koa-router/lib/router.js:321:16\n at dispatch (/opt/outline/node_modules/koa-compose/index.js:44:32)","level":"error","message":"Error during authentication"}
这是我的config.sh配置
为了我的域名能够访问,我在我机器上的nginx配置如下:
当我使用 http://wiki.lucq.fun 访问的时候,第一个页面能正常进入,当在第一个页面点击“使用openid继续”之后,他就跳转到了IP的网页。后续访问都是IP的网页。图片如下:
如果强制将IP访问的网页改为域名访问,比如将 http://118.25.79.194:8888/collection/welcome-Imb2SDo8P3 改为 http://wiki.lucq.fun/collection/welcome-Imb2SDo8P3 则又会跳转到认证页面。认证完成之后又会跳转到IP。
我也尝试过将config.sh 中的 URL=http://118.25.79.194:8888 改为 URL=http://wiki.lucq.fun ;但是认证却无法成功。
使用make logs查看日志,有如下关键警告日志: {"error":"State not return in OAuth flow","stack":"BadRequestError: State not return in OAuth flow\n at OAuthStateMismatchError (/opt/outline/build/server/errors.js:99:34)\n at StateStore.verify (/opt/outline/build/server/utils/passport.js:43:61)\n at OAuth2Strategy.authenticate (/opt/outline/node_modules/passport-oauth2/lib/strategy.js:222:26)\n at attempt (/opt/outline/node_modules/passport/lib/middleware/authenticate.js:366:16)\n at authenticate (/opt/outline/node_modules/passport/lib/middleware/authenticate.js:367:7)\n at /opt/outline/node_modules/@outlinewiki/koa-passport/lib/framework/koa.js:194:7\n at new Promise ()\n at /opt/outline/node_modules/@outlinewiki/koa-passport/lib/framework/koa.js:193:12\n at /opt/outline/node_modules/@outlinewiki/koa-passport/lib/framework/koa.js:143:7\n at new Promise ()\n at passportAuthenticate (/opt/outline/node_modules/@outlinewiki/koa-passport/lib/framework/koa.js:107:15)\n at passportMiddleware (/opt/outline/build/server/middlewares/passport.js:66:7)\n at dispatch (/opt/outline/node_modules/koa-compose/index.js:44:32)\n at next (/opt/outline/node_modules/koa-compose/index.js:45:18)\n at /opt/outline/node_modules/koa-router/lib/router.js:321:16\n at dispatch (/opt/outline/node_modules/koa-compose/index.js:44:32)\n at next (/opt/outline/node_modules/koa-compose/index.js:45:18)\n at methodOverrideMiddleware (/opt/outline/build/server/middlewares/methodOverride.js:22:12)\n at dispatch (/opt/outline/node_modules/koa-compose/index.js:44:32)\n at next (/opt/outline/node_modules/koa-compose/index.js:45:18)\n at /opt/outline/node_modules/koa-router/lib/router.js:321:16\n at dispatch (/opt/outline/node_modules/koa-compose/index.js:44:32)","level":"error","message":"Error during authentication"}
请问:如何配置config.sh我才能全程使用我的域名访问outline服务? 先谢谢你了,打扰你了!