![关于Linux Apache搭建多站点的问题,第1张 关于Linux Apache搭建多站点的问题,第1张](/aiimages/%E5%85%B3%E4%BA%8ELinux+Apache%E6%90%AD%E5%BB%BA%E5%A4%9A%E7%AB%99%E7%82%B9%E7%9A%84%E9%97%AE%E9%A2%98.png)
这是我的虚拟主机配置 ,记得重启一下apache NameVirtualHost *:80 ServerAdmin webmaster@123.com DocumentRoot "/home/wwwroot/123.com/wwwroot/" ServerName 123.com ServerAlias *.123.com ErrorLog "/home/wwwroot/123.com/logs/error_log" CustomLog "/home/wwwroot/123.com/logs/access_log" combined </VirtualHost><VirtualHost *:80>ServerAdmin webmaster@234.com DocumentRoot "/home/wwwroot/234.com/wwwroot/" ServerName 234.com ServerAlias 234.com ErrorLog "/home/wwwroot/234.com/logs/error_log" CustomLog "/home/wwwroot/234.com/logs/access_log" combined </VirtualHost>1、编辑httpd.conf
文件。查找DirectoryIndex 关键字,在后面添加:mp3.html
这一行是高手http进程在网站发布目录下找的索引文件的名字,即输入这个网站的名字后,第一个打开的网页的名字。一般后面跟随:index.htm index.html index.php index.jsp 中间用空格隔开。
2、同楼上的说法一致的,你可以将你的mp3.html改成index.html
祝你成功!
再有问题的话可以随时发消息联系我!
评论列表(0条)