Issue with app.yml file update

I get an error after running ./launcher rebuild app:

Did not find expected key while parsing block mapping at line 10 column 1 -e LANG-en_US.UTF8. 

YAML syntax error

I add this to the app.yml file after “after_code:” :

    - replace:
        filename: /etc/nginx/nginx.conf
        from: /sendfile.+on;/
        to: |
          server_names_hash_bucket_size 64;
          sendfile on;
    - file:
        path: /etc/nginx/conf.d/discourse_redirect_1.conf
        contents: |
          server {
            listen 80;
            return 301 $scheme://$request_uri;

    - replace:
        filename: "/etc/runit/1.d/letsencrypt"
        from: /--keylength/
        to: "-d -d --keylength"

The goal to redirect 301 old domain to new domain and with LetsEncrypt continue renewing for the old domain. The .yml file edited is on the “old domain” server.” and “” are placeholders not the real web address.

as suggested here and here.

1 Like

Yes. It’s a yaml error. It could be most anywhere in the file. There are various yaml checkers on the internet. One solution is to paste the whole file into one of those.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.