Home >Backend Development >PHP Tutorial >一个IP对应多个域名解决思路
一个IP对应多个域名
<VirtualHost www.域名1:80><br /> ServerAdmin [email protected]<br /> DocumentRoot /opt/lampp/htdocs/域名1目录<br /> ServerName www.域名1<br /> ErrorLog logs/dummy-host.example.com-error_log<br /> CustomLog logs/dummy-host.example.com-access_log common<br /> <Directory /opt/lampp/htdocs/域名1目录><br /> Options Indexes FollowSymLinks MultiViews<br /> AllowOverride None<br /> Order deny,allow<br /># Alow From all<br /> </Directory><br /></VirtualHost><br /><br /><VirtualHost www.域名2:80><br /> ServerAdmin [email protected]<br /> DocumentRoot /opt/lampp/htdocs/域名2目录<br /> ServerName www.域名2<br /> ErrorLog logs/dummy-host.example.com-error_log<br /> CustomLog logs/dummy-host.example.com-access_log common<br /> <Directory /opt/lampp/htdocs/域名2目录><br /> Options Indexes FollowSymLinks MultiViews<br /> AllowOverride None<br /> Order deny,allow<br /># Alow From all<br /> </Directory><br /></VirtualHost><br /><br /><VirtualHost www.域名3:80><br /> ServerAdmin [email protected]<br /> DocumentRoot /opt/lampp/htdocs/域名3目录<br /> ServerName www.域名3<br /> ErrorLog logs/dummy-host.example.com-error_log<br /> CustomLog logs/dummy-host.example.com-access_log common<br /> <Directory /opt/lampp/htdocs/域名3目录><br /> Options Indexes FollowSymLinks MultiViews<br /> AllowOverride None<br /> Order deny,allow<br /># Alow From all<br /> </Directory><br /></VirtualHost><br />现在遇到的问题是前两个好使,第3个域名访问的时候跳转的是第一个域名里的内容。。。求解。。<br /><br />