You are not logged in.
Hello
I'm trying to make my local HTTP server on my Arch machine accessible to other devices in my LAN, which is connected to the Internet via a router with DHCP. I am using iwd software to connect to the router. Please advise.
Note: My local HTTP server is running well using the following URLs,
http://localhost/ or http://servername/the web app names for example http://localhost/ossn/
Regards
Hossam
Offline
What web server are you using?
Is it listening on something other than localhost? Some servers you have to explicitly bind to an interface. Some let you use 0.0.0.0 to bind to all of them.
Can you reach your webpage at the IP address followed by the path? Example 192.168.1.123/ossn/
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
Hello
Following are the answers to your questions.
1- What web server are you using?
I am using Apache, Nginx and Node Js Web Servers.
2- Can you reach your webpage at the IP address followed by the path? Example 192.168.1.123/ossn/
For Apache and Nginx I can reach my webpage at the IP address like http://192.168.1.3/ossn/ but the link changed to http://localhost/ossn/ after press enter and this happen also when I am using the server name ( archlinux ) or the local IP ( 127.0.0.1 )
For Node JS, I can't access the application or webpage using the http://192.168.1.3 IP but other links are working find and I want to learn how I can use the dynamic IP like 192.168.1.3 IP with node JS.
3- Is it listening on something other than localhost? Some servers you have to explicitly bind to an interface. Some let you use 0.0.0.0 to bind to all of them
I will try to answer this question. For the application that run under Apache server I couldn't use 0.0.0.0 and when I am using other interface like local or dynamic IPs or the server name all are change to localhost.
Many Thanks
Offline
Are you using systemd-resolved, dnsmasq or other DNS related stuff ?
Have you tried from another physical device (phone , laptop) then the one the server is running on ?
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Online
Hello Lone,
Following are the answers to your questions.
- Are you using systemd-resolved, dnsmasq or other DNS related stuff ? No
- Have you tried from another physical device (phone , laptop) then the one the server is running on ? No
Regards
Offline
Have you setup nftables/iptables rules or are you running firewall software on the server ?
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Online
Hello Lone,
I am not setup nftables or running firewall software on my machine. For iptables, It's installed on the system by default.
Offline
Hello
For Apache and Nginx I can reach my webpage at the IP address like http://192.168.1.3/ossn/ but the link changed to http://localhost/ossn/ after press enter and this happen also when I am using the server name ( archlinux ) or the local IP ( 127.0.0.1 )
It may be worthwhile to confirm this using your browser's developer tools (specifically the Network tab), but I suspect that your Web server is configured to redirect requests that don't use the canonical hostname (e.g. as configured by Apache's ServerName directive) to its configured canonical hostname, which is, presumably, "localhost". Configuring the server's canonical hostname to match the host you'd like to use in your URLs may resolve that issue.
Offline
curl -vL http://192.168.1.3/ossn/ > /dev/null
will probably also confirm this but @blm768 is probably right.
Offline