# No access to router admin page 

**URL:** <https://forum.gl-inet.com/t/no-access-to-router-admin-page/51210>\
**Category:** Router\
**Created:** [December 1, 2024, 8:29pm UTC](https://forum.gl-inet.com/t/no-access-to-router-admin-page/51210 "2024-12-01T20:29:38Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Wojtrix](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/w/e95f7d/32.png) [@Wojtrix](https://forum.gl-inet.com/u/Wojtrix)\
**Post date:** [December 1, 2024, 8:29pm UTC](https://forum.gl-inet.com/t/no-access-to-router-admin-page/51210/1 "2024-12-01T20:29:38Z")

</div>

Hello, I am a happy owner of the Flint2 router ( this is my first post hopefully case will sorted quickly.)  
I quote my partial chat with gpt chat ( better to understand my problem and what happened):  
" I want to display static website when lan server is down means no response on ports 80 and 443 "  
chat GPT :  
"You can configure your OpenWRT router's Nginx web server to serve a static fallback page when the LAN server (your internal server) is down or not responding on ports 80 and 443. This can be achieved by using Nginx's proxy settings combined with a failover mechanism."  
**Edit your Nginx configuration** (`/etc/nginx/nginx.conf` or specific virtual host configuration):

- Add a health check mechanism using Nginx's `proxy_pass` and `error_page` directives.

## pure chat gpt proposition ( I had adjusted it to my configuration ) put as /etc/nginx/conf.d

server {  
listen 80;  
server\_name [your-domain.com](http://your-domain.com);

```
# Primary upstream: LAN server
upstream lan_server {
    server 192.168.1.100:80; # Replace with your LAN server's IP and port
    # You can add a second server for load balancing or redundancy
    # server 192.168.1.101:80;
}

location / {
    proxy_pass http://lan_server;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;

    # Error handling: if the LAN server is down, serve a static page
    error_page 502 503 504 = /fallback.html;
}

# Fallback static page
location = /fallback.html {
    root /var/www/html; # Path to static fallback page
    internal; # Makes the fallback page accessible only when the server is down
}

```

## }

I put the adjusted file as /etc/nginx/conf.d/server\_wojciech\_lol.conf  
when checked configuration by  
nginx -t  
I had an error that 'upstream lan\_server' is not proper context or something similar.  
so I thought that some NGINX packages had not been installed.  
I have router alive 2 days and I didn't change opkg sources and installed it from [https://fw.gl-inet.com](https://fw.gl-inet.com)  
I remember in the admin panel list of packages NGINX was shown as unknown or not installed.  
I have installed NGINX and some more probably ... :(......!!!  
Now I do not have access to web panel  
after my mistake when typing  
ngnix -t  
I have error: unknown directive "gzip static" in /etc/nginx/nginx.conf :22  
when commenting on line 22 and run nginx  
I have an address in use

1. how to restore the original NGINX configuration and safely install additional packages?  
2 how to set up a coexisting static website on the router.

---

_[View the full topic](https://forum.gl-inet.com/t/no-access-to-router-admin-page/51210)._
