查看文章
 
ubuntu 下apache2绑定域名
2010-01-15 17:23
先在本机的C:\WINDOWS\system32\drivers\etc目录下的hosts文件里绑定域名:如, [pU(z 'caS
192.168.1.1 www.xx.com; y ],op G 6
然后到在服务器上的/etc/apache2/sites-available目录下,新建一个文件default,文件的内容为: 8(`e\)%l 0
复制代码
  1. <VirtualHost *:80>
  2. DocumentRoot /var/www/music
  3. ServerName www.xx.com
  4. </VirtualHost>
X c[y m
= x +1A) Q
重启下apache,搞定了! r. ) n >
补充:如果出现apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName 6 2nmm / c
解决办法:sudo editor /etc/apache2/apache2.conf, Q=! lbW
在文件最后加上 a 5V lf x
#Server Name hpQ #`rhn
ServerName 127.0.0.1

类别:Linux||添加到搜藏 |分享到i贴吧|浏览(641)|评论 (0)
 
最近读者:
 
网友评论:
发表评论:
姓 名:
网址或邮箱: (选填)
内 容:
     

   
帮助中心 | 空间客服 | 投诉中心 | 空间协议
©2012 Baidu