Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/8.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
Apache中使用xampp的虚拟主机_Apache_Xampp - Fatal编程技术网

Apache中使用xampp的虚拟主机

Apache中使用xampp的虚拟主机,apache,xampp,Apache,Xampp,我有一个Python应用程序,我使用xampp通过在Apache中运行的html文档访问它。我必须从远程设备键入“desktop-6oirdq3:8081/db.html”才能访问该文件。我想使用一个更友好、更容易记住的URL。为此,我尝试在Apache中创建一个VirtualHost。文件的路径为: C:/xampp/htdocs/Dashboard/db.html 以下是我的httpd.conf的几行代码: Listen 8081 DocumentRoot "C:/xampp/h

我有一个Python应用程序,我使用xampp通过在Apache中运行的html文档访问它。我必须从远程设备键入“desktop-6oirdq3:8081/db.html”才能访问该文件。我想使用一个更友好、更容易记住的URL。为此,我尝试在Apache中创建一个VirtualHost。文件的路径为:

C:/xampp/htdocs/Dashboard/db.html

以下是我的httpd.conf的几行代码:

Listen 8081

DocumentRoot "C:/xampp/htdocs/Dashboard"

<Directory "C:/xampp/htdocs/Dashboard">
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Require all granted
</Directory>

<IfModule dir_module>
    DirectoryIndex index.php index.pl index.cgi index.asp index.shtml index.html index.htm \
                   default.php default.pl default.cgi default.asp default.shtml default.html  
                   default.htm \
                   home.php home.pl home.cgi home.asp home.shtml home.html home.htm index.py app.py
</IfModule>




Include conf/extra/httpd-vhosts.conf
ScriptInterpreterSource Registry-Strict
问题是,当我激活Apache并在搜索栏中键入“dashboard.com”时,它会显示“无法访问此站点”。我不知道怎么了。遵循了几个教程,但没有解决它。你知道吗?如果你需要更多的代码,我会提供 谢谢大家!

NameVirtualHost 192.168.1.134:8081
<VirtualHost 192.168.1.134:8081>
    DocumentRoot "C:/xampp/htdocs/Dashboard"
    ServerName dashboard.com
</VirtualHost>
<Directory "C:/xampp/htdocs/Dashboard">
    Order allow,deny
    Allow from all
    Options Indexes FollowSymLinks
    Require all granted
 </Directory>
::1 localhost
192.168.1.134 dashboard.com