# Issue with app.yml file update

**URL:** https://meta.discourse.org/t/issue-with-app-yml-file-update/177804
**Category:** Support
**Created:** [January 30, 2021, 9:36pm UTC](https://meta.discourse.org/t/issue-with-app-yml-file-update/177804 "2021-01-30T21:36:59Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Idan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/idan/32/198212_2.png) [@Idan](https://meta.discourse.org/u/Idan)
#### Post date: [January 30, 2021, 9:36pm UTC](https://meta.discourse.org/t/issue-with-app-yml-file-update/177804/1 "2021-01-30T21:36:59Z")

</div>

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:” :

```
 after_web_config:
    - 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;
            server_name old-domain.com;
            return 301 $scheme://new-domain.com$request_uri;
          }

after_ssl:
    - replace:
        filename: "/etc/runit/1.d/letsencrypt"
        from: /--keylength/
        to: "-d old-domain.com -d new-domain.com --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.

“[old-domain.com](http://old-domain.com)” and “[new-domain.com](http://new-domain.com)” are placeholders not the real web address.

as suggested [here](https://meta.discourse.org/t/redirect-single-multiple-domain-s-to-your-discourse-instance/18492) and [here](https://meta.discourse.org/t/setting-up-let-s-encrypt-with-multiple-domains/56685).

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [January 30, 2021, 10:03pm UTC](https://meta.discourse.org/t/issue-with-app-yml-file-update/177804/2 "2021-01-30T22:03:33Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [March 1, 2021, 10:04pm UTC](https://meta.discourse.org/t/issue-with-app-yml-file-update/177804/3 "2021-03-01T22:04:32Z")

</div>

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