WEB开发网
开发学院服务器WEB服务器Apache Apache虚拟主机快速搭建攻略 阅读

Apache虚拟主机快速搭建攻略

 2008-06-03 00:00:00 来源:WEB开发网   
核心提示: 文件样例: <VirtualHost 192.168.33.101:80> ServerAdmin webmaster@myserver.comThis e-mail address is being protected from spam bots, you need JavaSc

文件样例:

<VirtualHost 192.168.33.101:80>

ServerAdmin webmaster@myserver.comThis e-mail address is being protected from spam bots, you need JavaScript enabled to view it

ServerName server.myserver.com

DocumentRoot /srv/www/htdocs/server_port80

ErrorLog /var/log/apache2/server_port80.log

CustomLog /var/log/apache2/access_port80.log combined

HostnameLookups Off

UseCanonicalName Off

ServerSignature On

ScriptAlias /cgi-bin/ "/srv/www/htdocs/server_port80/cgi-bin/"

<Directory "/srv/www/htdocs/server_port80/cgi-bin">

AllowOverride None

Options +ExecCGI -Includes

Order allow,deny

Allow from all

</Directory>

<Directory "/srv/www/htdocs/server_port80">

Options Indexes FollowSymLinks

AllowOverride None

Order allow,deny

Allow from all

</Directory>

</VirtualHost>

如果你想在不同的端口上运行你的web页面,使用下面的配置文件:

<VirtualHost 192.168.33.101:8090>

ServerAdmin webmaster@myserver.comThis e-mail address is being protected from spam bots, you need JavaScript enabled to view it

ServerName server.myserver.com

DocumentRoot /srv/www/htdocs/server_port8090

ErrorLog /var/log/apache2/server_port8090.log

CustomLog /var/log/apache2/access_port8090.log combined

上一页  1 2 3 4 5  下一页

Tags:Apache 虚拟主机 快速

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接