Apache не может получить доступ к угловому приложению с другого компьютера в одной сети - PullRequest
0 голосов
/ 16 октября 2018

Я изменил свой vhosts файл wamp, чтобы другие люди в моей сети могли получить доступ к угловому приложению, созданному и установленному в каталоге www wamp.Вот сценарий:

# 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>

На других компьютерах люди не могли получить доступ к папке, набрав:

angular /

или

dev.local

или

192.168.10.1

Обратите внимание, что dev.localэто серверный скрипт углового проекта с angular именем сервера.

...