0

I am running my Raspberry (Pi 4, Model B, running latest Raspberry Pi OS bookworm) as an Access Point using hostapd, dnsmasq & dhcpcd to serve a website via nginix.

So people can connect wia WLAN an visit the Website.

This works on newer Devices (Laptop with Ubuntu 20+, Samsung S20 with Android 13) but not on older Devices (5+ years old Windows 10 Notebook, Huawai P20 Lite with Android 9)

The older devices can connect to the wifi access point but so not find the website via it's name

For Reference, those are my config files:

/etc/default/hostapd:

RUN_DAEMON=yes
DAEMON_CONF="/etc/hostapd/hostapd.conf"

/etc/hostapd/hostapd.conf:

interface=wlan0
ssid=myAP
channel=1
hw_mode=g
ieee80211n=1
ieee80211d=1
country_code=DE
wmm_enabled=1
auth_algs=1
wpa=2
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
wpa_passphrase=*******

/etc/dhcpcd.conf:

interface wlan0
static ip_address=192.168.1.1/24
nohook wpa_supplicant

address=/my-project.local/127.0.0.1

duid
persistent
vendorclassid
option domain_name_servers, domain_name, domain_search
option classless_static_routes
option interface_mtu
option host_name
option rapid_commit
require dhcp_server_identifier
slaac private

nginix config

server {

        listen 80 default_server;
        listen [::]:80 default_server;

        root /var/www/html/my-project/dist/;
        index index.html;

        server_name my-project.local;

        location / {
           try_files $uri$args $uri$args/ /index.html;
        }

        location /api {
          proxy_set_header X-Real-IP $remote_addr;
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
          proxy_set_header Host $http_host;
          proxy_set_header X-NginX-Proxy true;

          proxy_pass http://127.0.0.1:3000/api;
          proxy_redirect off;
        }
}

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.