问题:Gogs安装错误

环境操作系统:Centos7

面板:VestaCP (Nginx)

域:my.exgitrepo.com(本地)

IP:192.168.1.13(本地) 用户:admin

./gogs web
http://my.exgitrepo.com:3000/my.exgitrepo.com
ERR_EMPTY_RESPONSE

和控制台

[admin@271-appdevelopment-box public_html]$ ./gogs web
2017/10/07 17:33:01 [ WARN] Custom config '/home/admin/web/my.exgitrepo.com/public_html/custom/conf/app.ini' not found, ignore this if you're running first time
2017/10/07 17:33:01 [TRACE] Custom path: /home/admin/web/271.git.com/public_html/custom
2017/10/07 17:33:01 [TRACE] Log path: /home/admin/web/271.git.com/public_html/log
2017/10/07 17:33:01 [TRACE] Log Mode: Console (Trace)
2017/10/07 17:33:01 [ INFO] Gogs 0.11.29.0727
2017/10/07 17:33:01 [ INFO] Cache Service Enabled
2017/10/07 17:33:01 [ INFO] Session Service Enabled
2017/10/07 17:33:01 [ INFO] SQLite3 Supported
2017/10/07 17:33:01 [ INFO] Run Mode: Development
2017/10/07 17:33:01 [ INFO] Listen: http://0.0.0.0:3000
[Macaron] 2017-10-07 17:33:19: Started GET / for 192.168.1.131
[Macaron] 2017-10-07 17:33:19: Completed GET / 302 Found in 288.498µs
2017/10/07 17:33:19 [TRACE] Session ID: e39a6882496f8db1
2017/10/07 17:33:19 [TRACE] CSRF Token: GbC454VgjEUCw1Ry_do3P2GkXcU6MTUwNzM3Nzc5OTA1MzYxOTgxMQ==
[Macaron] 2017-10-07 17:33:19: Started GET /install for 192.168.1.131
2017/10/07 17:33:19 [TRACE] Session ID: e39a6882496f8db1
2017/10/07 17:33:19 [TRACE] CSRF Token: GbC454VgjEUCw1Ry_do3P2GkXcU6MTUwNzM3Nzc5OTA1MzYxOTgxMQ==
2017/10/07 17:33:19 [TRACE] Template: install
[Macaron] 2017-10-07 17:33:19: Completed GET /install 200 OK in 35.710305ms

单击安装时的以下响应

[Macaron] 2017-10-07 17:38:21: Started POST /install for 192.168.1.131
2017/10/07 17:38:21 [TRACE] Session ID: e39a6882496f8db1
2017/10/07 17:38:21 [TRACE] CSRF Token: GbC454VgjEUCw1Ry_do3P2GkXcU6MTUwNzM3Nzc5OTA1MzYxOTgxMQ==
2017/10/07 17:38:23 [TRACE] Custom path: /home/admin/web/my.exgitrepo.com/public_html/custom
2017/10/07 17:38:23 [TRACE] Log path: /home/admin/web/my.exgitrepo.com/logs
2017/10/07 17:38:23 [TRACE] Log Mode: File (Trace)
2017/10/07 17:38:23 [ INFO] Gogs 0.11.29.0727

我可以看到用表和日志文件创建的数据库是空的。

解答

经过几个小时的调试,我知道这是公用文件夹许可的问题。

chown admin:admin -R /home/admin/web/my.exgitrepo.com/public_html/public/

gogs,控制台输出因权限而挂起,并且没有显示有关权限问题的输出。