#[SOLVED] Where to locate web page to confirm password recovery

46 messages · Page 1 of 1 (latest)

broken rose
#

Hi. I'm trying to implement password recovery in my app, but I have met issue with locating web page on my server. I created simple html file which will confirm password recovery called recovery.html. Also I have my own domain - https://chowapp.site, which opens appwrite console. I want to open c password recovery confirm page by such link https://chowapp.site/recovery.html. Where should I locate file to achieve that?

dreamy cave
#

Are you using a VPS to host your appwrite instance?

#

Considering that you've self-hosted, you should have access to some sort of a terminal, which you must have used to install and setup appwrite.

#

You can use this terminal to point chowapp.site/recovery.html to the html file you created.

#

That's a very high-level explanation, so here's what I did.

#

I use nginx as my webserver.
my domain is example.com.

in my nginx config, all requests to example.com/ go to the appwrite console.
a request to example.com/fail will take the user to a locally-hosted html file.
and so on

#

you can do this with any webserver

broken rose
#

Thanks for answer! I will work on this direction.

dreamy cave
#

[SOLVED] Where to locate web page to confirm password recovery

broken rose
#

Hello again. I'm sorry to bother you. I probably almost did it, but I got stuck in one place. I decided to use Nginx Proxy Manager like here: https://medium.com/@stnguyen90/how-to-run-appwrite-behind-nginx-19348ed34243. Next, I created a docker container with an html file that I need. Via IP:Port I get access to file without any problems, as well as through the main domain using NPM, but I want my file to be located in this way example.com/recovery and when using the custom-domains tab with such parameters, I get a 404 error.

olive bough
eager elk
broken rose
# olive bough > Next, I created a docker container with an html file that I need. How does th...

Firstly I created image by this Dockerfile:

COPY . /usr/local/apache2/htdocs/

COPY cert1.pem /usr/local/apache2/conf/server.crt
COPY privkey1.pem /usr/local/apache2/conf/server.key

RUN sed -i \
        -e 's/^#\(Include .*httpd-ssl.conf\)/\1/' \
        -e 's/^#\(LoadModule .*mod_ssl.so\)/\1/' \
        -e 's/^#\(LoadModule .*mod_socache_shmcb.so\)/\1/' \
        conf/httpd.conf

And then run container with following command: docker run -dit --name recovery -p 2024:80 -p 2025:443 recovery

olive bough
broken rose
#

Yes

olive bough
broken rose
#

I want to use chowapp.site/recovery for recovery page.

olive bough
broken rose
olive bough
broken rose
#

I mean, if I use docker container (in my case recovery) in Details tab, everything works. When you enter chowapp.site, it throws you to the password recovery page. But if I specify this on the custom locations tab, then when I enter show chowapp/recovery, I have a 404 error. Maybe I'm moving in the wrong direction at all, because this is my first big project.

olive bough
olive bough
broken rose
# olive bough > if I use docker container (in my case recovery) in Details tab, everything wor...

I mean recovery from npm_gateway, where I added docker container which contains html file earlier.

        "Name": "npm_gateway",
        "Id": "08281cac18ef52c3e017952eda1567c50a09c6d2ed2694b3b7a3dc948fc92682",
        "Created": "2023-05-11T14:35:48.217696676+03:00",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
 ///
        "Containers": "217b1763e5f2717d6c42bde61d71fbadae330e45a5b347943e35068efd82e066": {
                "Name": "recovery",
                "EndpointID": "35d81b3ef7aec828acadb090ca4a1c84fbe355ec52fe940ccf56553c123a0954",
                "MacAddress": "02:42:ac:15:00:02",
                "IPv4Address": "172.21.0.2/16",
                "IPv6Address": ""
            },
            "32ccc54dd367f7d479181cf278b4dd7a351f36304a11412e871b1fd30edd0bf6": {
                "Name": "npm-app-1",
                "EndpointID": "42a6efa66fbb9ce7daa30eba67cca6302ec37d700141f0f68f5f6d5a31f9f1d1",
                "MacAddress": "02:42:ac:15:00:03",
                "IPv4Address": "172.21.0.3/16",
                "IPv6Address": ""
            },
            "efad25ce4ae75f56ad7cbb1099ab9ce7c55e85491160e410e69c379cf113a60b": {
                "Name": "appwrite-traefik",
                "EndpointID": "9f306ada0577d375443d23ed6b2fbd12b1c7f4d027889b1baba76db23c6ee0e8",
                "MacAddress": "02:42:ac:15:00:04",
                "IPv4Address": "172.21.0.4/16",
                "IPv6Address": ""
            }
        },
        "Options": {},
        "Labels": {
            "com.docker.compose.network": "gateway",
            "com.docker.compose.project": "npm",
            "com.docker.compose.version": "2.15.1"
        }
    }
olive bough
broken rose
olive bough
#

How do you see the recovery page?

broken rose
#

I just temporarily replaced it to check if recovery works as hostname. Now I have returned everything and the appwrite console returns on request. Previously, it opened as needed.

olive bough
olive bough
broken rose
olive bough
broken rose
broken rose
olive bough
olive bough
# broken rose

would you please share the output of docker inspect recovery?

olive bough
#

btw, your recovery page doesn't need to be on the same domain as your appwrite instance

broken rose
# olive bough is your recovery page blank?

It contained a simple form for entering a password and confirmation, but I only noticed that it is empty and the Index OF was written when accessing by IP. Before that, I was restarting the server, perhaps because of this. Anyway thanks for taking the time. It seems to me that I need to completely go through all the stages of creation, because I have recreated and changed a lot of things, and because of this something is probably going wrong.