English 中文(简体)
具有相同 ip 和 pache 中端口的多个域
原标题:Multiple domain with the same ip and port in apache

我要将 VPS 中两个不同的域与 Pip 和 Port 绑在一起, 这是我的 < code> httpd.conf :

<VirtualHost 106.187.96.123:80>
    DocumentRoot /home/roy/sobuhu
    ServerName aaa.com
</VirtualHost>

<VirtualHost 106.187.96.123:80>
    DocumentRoot /disk1/allen/www
    ServerName bbb.com
</VirtualHost>

<VirtualHost 106.187.96.123:80>
    DocumentRoot /disk1/allen/www
    ServerName www.bbb.com
</VirtualHost>

Can I config the ServerName use syntax like *.bbb.com ? so I can access www.bbb.com、bbs.bbb.com with the DocumentRoot /disk1/allen/www.

现在我访问bbs.bbb.com,它将转向/home/roy/sobuhu

最佳回答
NameVirtualHost *:80

<VirtualHost *:80>
    DocumentRoot /home/roy/sobuhu
    ServerName aaa.com
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot /disk1/allen/www
    ServerName bbb.com
    ServerAlias *.bbb.com
</VirtualHost>
问题回答

暂无回答




相关问题
Using SimplePie with CodeIgniter and XAMPP

I am using CodeIgniter 1.7.2 with XAMPP 1.7.2 on a Windows computer. I am trying to make use of SimplePie. I followed all the instructions I could find: a copy of simplepie.inc is in my applications/...

Multiple Sites with common files

I have developed over 50 sites that all use the exact same files other than CSS and IMAGES, I currently duplicate the files each time I create a new site and upload different css and images. What ...

http server validation

I finish a litle http server, writing from scratch. I would like to be sure that my imlementation is conforme to the HTTP specifications. W3C give us tools for HTML/XML conformance, but i see nothing ...

热门标签