关于Linux Apache搭建多站点的问题

关于Linux Apache搭建多站点的问题,第1张

这是我的虚拟主机配置 ,记得重启一下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

祝你成功!

再有问题的话可以随时发消息联系我!


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/bake/11678288.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-17
下一篇 2023-05-17

发表评论

登录后才能评论

评论列表(0条)

保存