mac implements ip access to apache server

Many times, when we are in the company, we need colleagues or outsiders to access through the local area network ip, and the apache server built by our own computer. When I used window and ubuntu before, it was very simple and I didn't encounter any problems. When using mac today, I found that there are still some details to pay attention to. Now to sum up, it has been prepared for later needs.

 

1: First change the access authority of the directory of your own file system to 777, the method is: sudo chmod -R 777 directory name

 

2: In addition, modify several configurations in the apache configuration file:

      2.1: <Directory>Add in  Allow from All (All for all ips)

      2.2: <Directory>Add inOptions Indexes (表示允许目录访问)

Require all granted2.3 Add permissions       in the configuration file  .

 

 Note: It should be noted that if you implement multiple virtual domain names through the http-vhost.conf file. Be sure to put the servername is localhost in the first place.

 

 

 

 

    

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326722064&siteId=291194637