我的httpd.conf文件
127.0.0.1 localhost
127.0.1.1 raghib-Inspiron-7420
127.0.0.1 project0.local
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
我想创建一个project0.local
我的httpd-vhost.conf文件
<VirtualHost *:80>
DocumentRoot /opt/lampp/htdocs
ServerName localhost
ServerAlias www.localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /home/raghib/vhosts/%0/html
ServerName project0.local
ServerAlias www.%0
ErrorLog logs/%0.local-error_log
CustomLog logs/%0.local-access_log common
</VirtualHost>
我在htttpd.conf文件中没有注释Include etc / extra / httpd-vhosts.conf
I HAVE CREATED index.html in my /home/raghib/vhosts/project0/html/index.html when i write http://localhost/ and http://project0.local both refer to /opt/lampp/htdocs
I WANT MY http://project0 to redirect into/home/raghib/vhosts/project0/html/index.html