You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Can't access my local web server on Mac mini from Laptop after MX records update

I run a web server on my Mac mini on my Wi-Fi network. Somehow, after adding some MX records to my domain provider, I can no longer access my server on my laptop.


However, I can access it just fine on my iPhone and my iPad.


Monitoring websites outside my network also report that my website is up.


I tried cleaning website data from Safari and Chrome but both cannot access my website.


What am I missing?


[Re-Titled by Moderator]



MacBook Pro 16″, macOS 15.3

Posted on Jan 3, 2025 8:17 AM

Reply
19 replies

Jan 4, 2025 6:00 AM in response to NemesysSoftware

I would check the network settings on the laptop and make sure the network adapter being used is correct and connected to the correct network.


If all the above appears correct, try renewing its DHCP lease.


You may need to dig deeper into Details in the network settings interface and make sure all is as it should be (TCP/IP,DNS, WINS, etc.)


You may even need to remove the network interface in Settings and then re-add it. It isn't common, but sometimes the network settings get corrupted and need to be "reset".

Jan 4, 2025 9:36 PM in response to NemesysSoftware

"Can't access my website on my local network: I run a web server on my Mac mini on my Wi-Fi network. Somehow, after adding some MX records to my domain provider, I can no longer access my server on my laptop. However, I can access it just fine on my iPhone and my iPad. Monitoring websites outside my network also report that my website is up. I tried cleaning website data from Safari and Chrome but both cannot access my website. What am I missing?"

-------


Troubleshooting a Computer’s Connections to a WiFi Network:


What does the Error Message Read:

Are you getting a “404” error message? If so, then there is an issue connecting to the server.

Jan 5, 2025 5:16 AM in response to NemesysSoftware

NemesysSoftware wrote:

Thanks for the suggestion but I'm not so sure. I rebooted my MacBook Pro in Windows 10. Chrome on Windows could not find my server either. So, I'm not sure removing the network interface would help...

Is Win10 running in a virtual machine or natively via Bootcamp?


If it is via virtual machine, if the Windows virtual machine is set up to share the Mac's network connection the test is not valid since the Mac is just forwarding from macOS to the Virtual machine.


If the the virtual machine is configured to look like a a totally different machine on the network or if you are running Win10 natively via a Bootcamp install, the issue is somewhere in your network or your server.


All this is assuming your MacBook Pro can access network and internet normally.

Jan 6, 2025 5:37 AM in response to NemesysSoftware

NemesysSoftware wrote:

It was running natively via Bootcamp. No virtual machine.
....

If it is happening both in Windows and macOS, then i would say the issue is with the network or your server not "liking" the Mac after changes you made to the server.


Is the Mac working normally on the network otherwise and it is just the server access that is the issue? If so that strongly points to an issue with changes you made to the server.

Jan 6, 2025 8:15 PM in response to NemesysSoftware

NemesysSoftware wrote:

It was running natively via Bootcamp. No virtual machine.

Here is the message Safari displays.


Okay. To summarize this, an unspecified web server running on Microsoft Windows or maybe Windows Server is inaccessible on the local network from macOS and Windows, and the web browsers on macOS and Windows browser clients are both reporting a server connection error.


Look in the web server logs, as a starting point.


You’re running a server, so logs are going to be a common troubleshooting resource.


I’d investigate whether your TLS certificate is incorrect, or maybe missing an intermediate certificate, or your server DNS might have a configuration issue.


Or Apache or IIS or whatever web server you’re running on Windows is unhappy, maybe due to the web server virtual host (this as differentiated from an operating system virtual host) the local browser clients are requesting, as differentiated from the web server (virtual host) the remote browser clients are requesting; configuration or certificate or DNS errors.


It’s also possible that the local Wi-Fi router or local network routing configuration is incorrect, or the router itself is confused. That if the connection isn’t getting to the correct Windows server box, or maybe the routing to or from the Windows server is getting tangled.


But this probably also isn’t the best place to seek help troubleshooting an unspecified Windows web server, and one probably related to a certificate or to DNS or routing issue.


Jan 7, 2025 4:09 PM in response to MrHoffman

The Apache server is running on my Mac mini. Like I mentioned before, everybody outside my Wi-Fi network can access my website just fine. Even my iPhone and my iPad can access it. Just my MacBook Pro, whenever it's booted in macOS Sequoia or Windows 10.


I'm not sure how to check the routing configuration on the router. It's an Xfinity router at the moment.

Jan 7, 2025 5:16 PM in response to NemesysSoftware

With apologies, ASC crashed Safari, and recovery messed with the formatting of the following.


Okay, so this would best be in a DMZ or hosting the website elsewhere. This as hosting locally risks breaches behind the firewall. But if you’re mixing it all together with a server exposed to the ’net as I’d suspect, then this discussion is headed for some basic knowledge of IP and IP routing, and also some basic knowledge of Apache and its logs.


Apache can be set up in various ways including the built-in, various add-ons, and app packages such as MAMP, so I can’t point to a specific place or specific tutorial for your particular install, and the details of macOS and macOS Server (R.I.P.) have also varied over the years. I’ll assume you’re not running macOS Server here.


If it’s the default macOS Apache install or something close to it, then start with the following commands:

which apachectl
which httpd
httpd -V


That should show you some generic app configuration information, as well as probably showing the path to the error log files.


If not, then look for your httpd.conf file — wherever that is in your install — and look for the error log location directive in that file.


The default location for that Apache configuration file with the macOS (not macOS Server!) built-in Apache is:

/etc/apache2/httpd.conf


Probably finding this directive referencing the error log:

ErrorLog "/private/var/log/apache2/error_log"


Okay. Hopefully you've found your particular error log, and looked in it for errors related to the TLS certificate or the connection, or whatever else might be (not) happening.


The following describes the TLS certificate setup:

https://getgrav.org/blog/macos-sequoia-apache-ssl


I’ll leave IP and DNS troubleshooting aside for the moment, but that may be your next stop.

Jan 9, 2025 6:42 PM in response to MrHoffman

Well, checking the Apache access.log, it seems that the server is not receiving the requests from my laptop.


I tried to access the site at exactly 21:35:15 -0500. Here are the last lines of access.log on the web server:


5.70.141.105 - - [09/Jan/2025:21:13:15 -0500] "GET / HTTP/1.0" 200 36569
47.128.118.210 - - [09/Jan/2025:21:14:57 -0500] "GET /robots.txt HTTP/1.1" 404 196
47.128.48.200 - - [09/Jan/2025:21:18:55 -0500] "GET /robots.txt HTTP/1.1" 404 196
91.214.29.125 - - [09/Jan/2025:21:20:30 -0500] "GET / HTTP/1.0" 200 36569
47.128.120.156 - - [09/Jan/2025:21:22:55 -0500] "GET /robots.txt HTTP/1.1" 404 196
13.42.205.55 - - [09/Jan/2025:21:24:19 -0500] "GET / HTTP/1.1" 200 36569
125.230.252.101 - - [09/Jan/2025:21:24:34 -0500] "GET / HTTP/1.0" 200 36569
43.131.249.153 - - [09/Jan/2025:21:25:31 -0500] "GET / HTTP/1.1" 200 36569
47.128.35.208 - - [09/Jan/2025:21:26:58 -0500] "GET /robots.txt HTTP/1.1" 404 196


There is absolutely no sign that my laptop tried to access the site.


The error.log doesn't have anything around 9:35 PM. Here are the last line:

[Thu Jan 09 20:52:12.563509 2025] [autoindex:error] [pid 25785] [client 185.153.151.137:24407] AH01276: Cannot serve directory /Library/WebServer/Documents/about/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive


Not sure what that error is but it's definitely not my laptop as my IP address is 69.255.20.173.


So, I'm really confused...

Jan 13, 2025 5:45 PM in response to NemesysSoftware

Did you check the error log for related errors?

NemesysSoftware wrote:

I'm sorry, I thought it would be helpful to check the access log and see if there was any activity from trying to access the website.


When something in the network or something in the server is blocking or dropping the incoming connection without showing even an error page, that activity probably won’t show in the access log.


What else should I try?


The error log.


There are undoubtedly some Apache troubleshooting documents around the ‘net, too.

Jan 13, 2025 5:59 PM in response to MrHoffman

Here is the error log. Nothing in it that could explain why I can't access it from my laptop:


[Thu Jan 09 20:52:12.563509 2025] [autoindex:error] [pid 25785] [client 185.153.151.137:24407] AH01276: Cannot serve directory /Library/WebServer/Documents/about/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Sat Jan 11 17:23:12.063794 2025] [core:error] [pid 25160] [client 42.240.131.8:6783] AH10244: invalid URI path (/cgi-bin/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/bin/sh)
[Sun Jan 12 06:05:18.446376 2025] [core:error] [pid 35405] [client 157.245.105.242:48954] AH10244: invalid URI path (/cgi-bin/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/bin/sh)
[Sun Jan 12 15:11:25.698810 2025] [ssl:error] [pid 11097] [client 18.97.5.12:52772] AH02042: rejecting client initiated renegotiation
[Sun Jan 12 17:26:41.146588 2025] [core:error] [pid 11115] [client 78.153.140.224:38860] AH10244: invalid URI path (/../.env)
[Mon Jan 13 11:31:20.248265 2025] [core:error] [pid 27234] [client 39.103.191.118:32832] AH10244: invalid URI path (/cgi-bin/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/bin/sh)
[Mon Jan 13 11:31:21.381346 2025] [core:error] [pid 27232] [client 39.103.191.118:33068] AH10244: invalid URI path (/cgi-bin/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/bin/sh)
[Mon Jan 13 17:33:23.506169 2025] [core:error] [pid 27236] [client 213.232.124.137:39474] AH10244: invalid URI path (/cgi-bin/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/bin/sh)
[Mon Jan 13 17:33:26.603853 2025] [core:error] [pid 27246] [client 213.232.124.137:39486] AH10244: invalid URI path (/cgi-bin/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/bin/sh)

These are the last 10 lines of the error log. I just tried to access it again from my laptop before getting the log.

My IP address is 69.255.20.173. It's nowhere in the error log...

Jan 21, 2025 7:23 AM in response to NemesysSoftware

NemesysSoftware wrote:

How do I check the access chatter originating from my local network?


Look for error log or other Apache log entries with addresses from within your local IP subnet, or alternatively shut off remote access into the web server at the firewall and test web server access (try to trigger the error) and then view the logs all during the remote-access pause, and then re-enable remote access.


Any add-on VPNs or add-on security apps or other potentially-routing-modifying apps present on client, or on server?


Router firmware current?

Jan 22, 2025 5:26 AM in response to NemesysSoftware

I don't know if you have tried this or not, but have you simply tried to PING the server computer from the laptop? This would quickly tell you if it is a network or server issue.


Have you tried using Wireshark?


I would try Wireshark and use the filter to limit the connection to the IP address of the server. Then, from the laptop, send the website request and see what traffic goes back and forth during that request. Generally one would see the initial request from the laptop and then handshaking traffic to setup the security connection and then followed the http response.


There could then possibly see if there is a TLS issue that may not be completing or if the server is even getting the request.


I have used Wireshark quite often in debugging embedded web servers, telnet, SSH, etc. and has helped to quickly find the issue.

Can't access my local web server on Mac mini from Laptop after MX records update

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.