apache 2.4
#虚拟主机配置文件
<VirtualHost *:80>
#绑定的主域
ServerName bookstore.com
#绑定的子域名
ServerAlias www.bookstore.com
#网站主目录
DocumentRoot /var/www/www.bookstore.com/
#日志路径配置(如果没有,请记得创建)
ErrorLog /var/www/web_log/error_bookstore.com.log
CustomLog /var/www/web_log/custom_bookstore.com.log common
#ServerSignature Off
</VirtualHost>
#网站的配置
<Directory "/var/www/www.bookstore.com/">
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
apache 2.2
NameVirtualHost :80
<VirtualHost :80>
ServerAdmin webmaster@dummy-host.www.phpStudy.net
DocumentRoot "C:/Program Files/Apache2/docs/dummy-host.www.phpStudy.net"
ServerName dummy-host.www.phpStudy.net
ServerAlias www.dummy-host.www.phpStudy.net
ErrorLog "logs/dummy-host.www.phpStudy.net-error.log"
CustomLog "logs/dummy-host.www.phpStudy.net-access.log" common
</VirtualHost>
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。