Caddy server apenas escutando na porta 2015

0

Eu notei que meu site não estava mais sendo veiculado, então fui investigar. Não há nada nos logs que indique que algo está errado e, no entanto, o servidor não está respondendo a solicitações em nenhum dos meus hosts, exceto na porta 2015. Aqui está o meu Caddyfile completo:

direct.frederikcreemers.be, www.frederikcreemers.be {
    root frederikcreemers.be/public
    log
    errors

    git {
        repo https://gitlab.com/frederikcreemers/frederikcreemers.be.git
        path frederikcreemers.be
        hook /pushed none
        then caddy
        interval 3000
    }

     hugo frederikcreemers.be
}

media.frederikcreemers.be, localhost:8080 {

    log
    errors
    filemanager /manage {
        no_auth
        commands "git wget"
    }

    root public
    browse

    jwt {
        path /private
        redirect /login?next={path}
        allow sub [email protected]
        allow sub [email protected]
        allow sub [email protected]
        allow sub [email protected]
        allow sub [email protected]
        allow sub [email protected]
    }

    jwt {
    path /manage
        redirect /private
        allow sub [email protected]
    }

    login {
        success_url /
        logout_url /
        google "client_id=foo,client_secret=bar,scope=https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/plus.me"
        cookie_expiry 168h
        jwt_expiry 168h
    }
}

creetris.frederikcreemers.be {
    root creetris
    errors {
        404 index.html
    }
}

Eu executei o seguinte comando para descobrir quais aplicativos estavam ouvindo em quais portas:

netstat -tulpn

E aqui está o único resultado que obtive ou caddy:

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp6       0           0             :::2015                      :::*                           LISTEN  25632/caddy     

Estou executando o caddd usando o systemd. Aqui está o arquivo da unidade:

[Unit]
Description=Caddy HTTP/2 web server
Documentation=https://caddyserver.com/docs
After=network-online.target
Wants=network-online.target systemd-networkd-wait-online.service

[Service]
WorkingDirectory=/home/media
Restart=on-abnormal
Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"

; User and group the process will run as.

; Always set "-root" to something safe in case it gets forgotten in the Caddyfile.
ExecStart=/usr/local/bin/caddy -log stdout -agree=true
ExecReload=/bin/kill -USR1 $MAINPID

; Use graceful shutdown with a reasonable timeout
KillMode=mixed
KillSignal=SIGQUIT
TimeoutStopSec=5s

; Limit the number of file descriptors; see 'man systemd.exec' for more limit settings.
LimitNOFILE=1048576
; Unmodified caddy is not expected to use more than that.
LimitNPROC=512

; Use private /tmp and /var/tmp, which are discarded after caddy stops.
;PrivateTmp=true
; Use a minimal /dev
;PrivateDevices=true
; Make /usr, /boot, /etc and possibly some more folders read-only.
;ProtectSystem=full
; … except /etc/ssl/caddy, because we want Letsencrypt-certificates there.
;   This merely retains r/w access rights, it does not add any new. Must still be writable on the host!
;ReadWriteDirectories=/root/.caddy;/home/media

; The following additional security directives only work with systemd v229 or later.
; They further retrict privileges that can be gained by caddy. Uncomment if you like.
; Note that you may have to add capabilities required by any plugins in use.
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_BIND_SERVICE
NoNewPrivileges=true

[Install]
WantedBy=multi-user.target

Aqui estão os registros que eu recebo para o Caddy quando eu inicio usando 'systemctl start caddie' '

May 01 19:20:21 ubuntu-512mb-fra1-01 systemd[1]: Started Caddy HTTP/2 web server.
May 01 19:20:21 ubuntu-512mb-fra1-01 caddy[25687]: Activating privacy features... done.
May 01 19:20:21 ubuntu-512mb-fra1-01 caddy[25687]: [WARNING] A database is going to be created for your File Manager instance at .caddy/filemanager/8f8ebb77287b3283b2cd93b625547577.db. It is highly recommended that you set th
May 01 19:20:21 ubuntu-512mb-fra1-01 caddy[25687]: [WARNING] A database is going to be created for your File Manager instance at .caddy/filemanager/96706b75e763a6accd04c4736aafe59c.db. It is highly recommended that you set th
May 01 19:20:21 ubuntu-512mb-fra1-01 caddy[25687]: [WARNING] A database is going to be created for your File Manager instance at .caddy/filemanager/a9edda69bab5269b7076ad6739f97621.db. It is highly recommended that you set th
May 01 19:20:21 ubuntu-512mb-fra1-01 caddy[25687]: [WARNING] A database is going to be created for your File Manager instance at .caddy/filemanager/ed3c77e098a98c5598578c43590134dd.db. It is highly recommended that you set th
May 01 19:20:21 ubuntu-512mb-fra1-01 caddy[25687]: [WARNING] A database is going to be created for your File Manager instance at .caddy/filemanager/d225eaa3d82bb1989154334fa90a61f0.db. It is highly recommended that you set th
May 01 19:20:22 ubuntu-512mb-fra1-01 caddy[25687]: From https://gitlab.com/frederikcreemers/frederikcreemers.be
May 01 19:20:22 ubuntu-512mb-fra1-01 caddy[25687]:  * branch            master     -> FETCH_HEAD
May 01 19:20:23 ubuntu-512mb-fra1-01 caddy[25687]: Already up-to-date.
May 01 19:20:23 ubuntu-512mb-fra1-01 caddy[25687]: 2018/05/01 19:20:23 https://gitlab.com/frederikcreemers/frederikcreemers.be.git pulled.
May 01 19:20:23 ubuntu-512mb-fra1-01 caddy[25687]: Activating privacy features... done.
May 01 19:20:23 ubuntu-512mb-fra1-01 caddy[25687]: http://:2015

Não vejo nada que possa explicar o meu problema. O aviso filemanager é porque eu não especifiquei um banco de dados, mas isso é porque eu estou usando o plugin de login ao invés do sistema de autenticação embutido do gerenciador de arquivos.

Alguma idéia do que está acontecendo aqui, ou o que devo fazer para investigar mais a questão?

    
por bigblind 02.05.2018 / 03:11

0 respostas