# Probleem met update van app.yml bestand

**URL:** <https://meta.discourse.org/t/issue-with-app-yml-file-update/177804>\
**Category:** Product Support\
**Created:** [30 januari 2021 om 21:36 UTC](https://meta.discourse.org/t/issue-with-app-yml-file-update/177804 "2021-01-30T21:36:59Z")\
**Posts on this page:** 1\
**Showing post:** 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:** [30 januari 2021 om 21:36 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).

---

_[View the full topic](https://meta.discourse.org/t/issue-with-app-yml-file-update/177804)._
