# Showing a "Under maintenance" page using nginx at the "launcher rebuild app"?

**URL:** <https://meta.discourse.org/t/showing-a-under-maintenance-page-using-nginx-at-the-launcher-rebuild-app/281488>\
**Category:** Self-hosting\
**Created:** [October 8, 2023, 2:34am UTC](https://meta.discourse.org/t/showing-a-under-maintenance-page-using-nginx-at-the-launcher-rebuild-app/281488 "2023-10-08T02:34:52Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![PrettyGirl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/prettygirl/32/330415_2.png) [@PrettyGirl](https://meta.discourse.org/u/PrettyGirl)\
**Post date:** [October 8, 2023, 2:34am UTC](https://meta.discourse.org/t/showing-a-under-maintenance-page-using-nginx-at-the-launcher-rebuild-app/281488/1 "2023-10-08T02:34:52Z")

</div>

The site maintenance with “./launcher rebuild app” takes some time to fully rebuild the site (installing new plugins etc from git).  
Is there any recommended way to show a static page saying “Under maintenance” while I rebuild the discourse?

What I thought was to use nginx. That involves stopping the docker to serve on port 80 and letting nginx reverse proxy to takeover and redirect traffic to either docker container or to my static page.

I’m thinking of doing that with manually editing the `nginx.conf` to the following whenever needed,

```plaintext
server {
    listen 80;
    server_name your-discourse-domain.com;

location / {
    proxy_pass http://localhost:80;
    proxy_set_header Host $http_host;
    proxy_http_version 1.1;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto https;
    proxy_redirect http:// https://;
}
}

```

and replacing with,

```plaintext
server {
    listen 80;
    server_name your-discourse-domain.com;

    location / {
        root /path/to/your/maintenance/page;
    }
}

```

What are your suggestions? I’m using AWS EC2 servers. Is there any better way?

---

_[View the full topic](https://meta.discourse.org/t/showing-a-under-maintenance-page-using-nginx-at-the-launcher-rebuild-app/281488)._
