1. 打开文件 /etc/httpd/conf/httpd.conf, 搜索 VirtualHost example, 找到代码如下:
# # VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for requests without a known # server name.
2.改掉注释,然后根据需要自己修改
<VirtualHost *:80> ServerAdmin ***@***.com DocumentRoot /var/www/drupal ServerName www.***.com ErrorLog logs/dummy-host.log CustomLog logs/dummy-host.log common </VirtualHost> 3.重启httpd 服务, 执行以下语句.
service httpd restart
(责任编辑:IT) |