0

在linux平台上 用apache配置虚拟主机


基于apache的虚拟主机 具体的配置方法,前提是已经装了apache,我这里平台是Debian + apache2
创建网站的文件夹
mkdir /var/www/1
mkdir /var/www/2
debian:/etc/apache2/sites-enabled# cat 1
<VirtualHost *>
ServerName 1 网站名称
DocumentRoot /var/www/1 主目录 
CustomLog /var/log/apache2/1_access.log combined 指定日志
Options Indexes MultiViews FollowSymLinks 是否允许目录软链接
</VirtualHost>
然后a2ensite新的这个域名,再把apache reload一下,就可以用了。

磁盘配额的没弄,等有做再写上来。

我猜~这些文章你可能也感兴趣

暂时没有留言..

给我留言:

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word