设置虚拟域名
1.修改hosts文件,目录:C:\Windows\System32\drivers\etc,添加,例
localhost doma.com
<Directory />
AllowOverride none
Require all denied
</Directory><Directory />
#AllowOverride none
#Require all denied
 AllowOverride all
Order deny,allow
Allow from all
</Directory><VirtualHost *:80>
ServerAdmin doma.com
DocumentRoot "c:/wamp/www/doma"
ServerName doma.com
ServerAlias www.dummy-host.example.com
ErrorLog "logs/dummy-host.example.com-error.log"
CustomLog "logs/dummy-host.example.com-access.log" common
</VirtualHost>但是,出现了问题,访问localhost,或者其他目录报错
403 Forbidden You don't have permission to access / on this server
404 Forbidden The requested URL was not found on this server
需要血钙https-vhosts.cong文件,将其中的
<VirtualHost *:80> ... </VirtualHost>
<Directory />
#AllowOverride none
#Require all denied
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order deny,allow
Allow from all
</Directory>
以上就介绍了 关于apache虚拟域名的设置,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号