Apache无法从同一网络上的其他计算机访问角度应用程序

时间:2018-10-16 06:49:17

标签: apache wamp wampserver

我更改了wamp的vhosts文件,以允许网络上的其他人访问在wamp的www目录中构建和设置的angular应用程序。这是脚本:

# Virtual Hosts
#
<VirtualHost *:80>
  ServerName localhost
  ServerAlias localhost
  DocumentRoot "${INSTALL_DIR}/www"
  <Directory "${INSTALL_DIR}/www/">
    Options +Indexes +Includes +FollowSymLinks +MultiViews
    AllowOverride All
    #Require local
    Require ip 192.168.10
    Require ip 192.168.0
  </Directory>
</VirtualHost>

#dev.local
<VirtualHost *:80>
  ServerAdmin ali@ali.com
  DocumentRoot "${INSTALL_DIR}/www/dev/"
  ServerName dev.local
  ServerAlias www.dev.local
  <Directory "/">
    Allow from 127.0.0.1
    Allow from 192.168.10
    #Require local
    Require all granted
  </Directory>
</VirtualHost>

#
<VirtualHost *:80>
    ServerName angular
    DocumentRoot "c:/wamp64/www/angular"
    <Directory  "c:/wamp64/www/angular/">
        Options +Indexes +Includes +FollowSymLinks +MultiViews
        AllowOverride All
        #Require local
        Require all granted
    </Directory>
</VirtualHost>

在其他计算机上,人们无法通过键入以下内容来访问该文件夹:

  

角度/

  

dev.local

  

192.168.10.1

请注意,dev.local是使用angular作为服务器名称的angular项目的服务器脚本。

0 个答案:

没有答案