Mac apache简单开关和IP禁用

来源:互联网 发布:北京网络电视台 编辑:程序博客网 时间:2024/06/01 10:15
简单的写一些Mac下的Apache打开和关闭以及禁用IP.

打开和关闭

查看mac apache版本 :

sudo apachectl -v


打开mac apache:
sudo apachectl start

关闭mac apache:
sudo apache stop

重启Mac apache:
sudo apachectl restart

禁用IP

编辑

vi /etc/apache2/httpd.conf或者

sudo vim /etc/apache2/httpd.conf

在最后加上

NameVirtualHost xx.xx.xx.xx

ServerName xx.xx.xx.xx

Order Allow,Deny

Deny from all

保存退出后记住重启apache还有其他方法不一一写出.


0 0
原创粉丝点击