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