我就是不曉得如何讓兩個域名對應同一個IP,然後能識別出不同的網站?
NameVirtualHost 12.34.56.78 # your ip address
<VirtualHost 12.34.56.78>
ServerName yourname1
DocumentRoot yourpath1
</VirtualHost>
<VirtualHost 12.34.56.78>
ServerName yourname2
DocumentRoot yourpath2
</VirtualHost>
If you want to use 443
NameVirtualHost 12.34.56.78:80 # your ip address
NameVirtualHost 12.34.56.78:443 # your ip address
<VirtualHost 12.34.56.78:80>
ServerName yourname1
DocumentRoot yourpath1
</VirtualHost>
<VirtualHost 12.34.56.78:443>
ServerName yourname1
DocumentRoot yourpath1
</VirtualHost>