U
U
usatikov2011-05-29 00:36:59
Apache HTTP Server
usatikov, 2011-05-29 00:36:59

How to prevent access to the local web server from the network in Mac OS?

Mac OS 10.6.6. In "System Preferences" I check the box "Shared Web Access" - Apache automatically starts and an allow rule appears in the firewall. Thus, in the local network or even from the Internet, you can dial my IP and see the site I'm working on.
I uncheck the box, enter “apachectl start” in the terminal, then “Web Sharing” turns on by itself and a rule appears at the firewall.
I'm a developer, I don't need my site to be visible to everyone. Maybe someone knows a simple solution?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Antipov, 2011-05-29
@usatikov

You can edit the configuration file
private/etc/apache2/httpd.conf
Line Replace with
<IfDefine !MACOSXSERVER>
Listen 80
</IfDefine

<IfDefine !MACOSXSERVER>
Listen 127.0.0.1:80
</IfDefine

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question