我的ubuntu在apache下/etc/apach2/有sites-available文件夹,这个下面有default.conf(000-default.conf)文件,这个里面添加上:
<VirtualHost *:80>
ServerAdmin chen@gmail.com
ServerName alps.judianer.tk
DocumentRoot "/home/alps/Sites/judianer"
<Directory "/home/alps/Sites/judianer">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
ErrorLog /home/alps/log/judianer-error.log
CustomLog /home/alps/log/judianer-access.log common
</VirtualHost>
这里有些类似apache本地配置虚拟域名,然后重启apache
本文介绍如何在Ubuntu系统中使用Apache配置虚拟主机。通过编辑/etc/apache2/sites-available/default.conf文件,添加虚拟主机设置,并指定域名、文档根目录及日志文件等参数。完成配置后重启Apache服务使设置生效。
1090

被折叠的 条评论
为什么被折叠?



