Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
为用户red配置apache vhost_Apache_Configuration_Config - Fatal编程技术网

为用户red配置apache vhost

为用户red配置apache vhost,apache,configuration,config,Apache,Configuration,Config,当我尝试将我的本地主机与另一台电脑连接时,我遇到了一个问题,我无法在另一台电脑上看到本地主机的数据,我需要从另一台电脑进行更改,但不起作用,我使用IP连接到我的本地主机,我在apache/conf/extra/httpd vhosts.conf上有此配置,这与我的angular项目一起工作。我的应用程序与REST一起工作 但无法进行更改,也无法在本地主机上看到数据存储 <VirtualHost *:80> ServerName my-app Doc

当我尝试将我的本地主机与另一台电脑连接时,我遇到了一个问题,我无法在另一台电脑上看到本地主机的数据,我需要从另一台电脑进行更改,但不起作用,我使用IP连接到我的本地主机,我在
apache/conf/extra/httpd vhosts.conf
上有此配置,这与我的angular项目一起工作。我的应用程序与REST一起工作

但无法进行更改,也无法在本地主机上看到数据存储

 <VirtualHost *:80>
        ServerName my-app

        DocumentRoot C:\xampp\htdocs\frontend_dekma

        <Directory C:\xampp\htdocs\frontend_dekma>
            RewriteEngine on

            # Don't rewrite files or directories
            RewriteCond %{REQUEST_FILENAME} -f [OR]
            RewriteCond %{REQUEST_FILENAME} -d
            RewriteRule ^ - [L]

            # Rewrite everything else to index.html to allow html5 state links
            RewriteRule ^ index.html [L]
        </Directory>
    </VirtualHost>

ServerName我的应用程序
DocumentRoot C:\xampp\htdocs\frontend\u dekma
重新启动发动机
#不要重写文件或目录
RewriteCond%{REQUEST_FILENAME}-f[或]
RewriteCond%{REQUEST_FILENAME}-d
重写规则^-[L]
#将所有其他内容重写为index.html,以允许html5状态链接
重写规则^index.html[L]

您是否使用主机标题访问它?尝试将
ServerAlias*
添加到您的配置文件中。不,我正在使用IP'192.168.0.1'访问的只是本地的,我尝试ServerAlias*但不工作。您会得到什么错误?除了看不到数据之外,真正的错误是什么?404? 500? 空洞的回答?暂停?连接被拒绝?在本地,我可以看到数据库中的记录,当我通过ip连接时,我无法从另一台电脑看到这些记录。我认为这是一个配置错误,因为应用程序工作正常;您的客户端计算机上的响应代码是什么?