更改apatch端口为80, [warn] NameVirtualHost 10.254.1.65:80 has no VirtualHosts



一、LAMP修改为web访问的端口

1.修改conf

/newdisk/wdlinux/httpd-2.2.24/conf

#ServerName www.example.com:80
ServerName localhost:80

# NameVirtualHost *:8081
NameVirtualHost *:80

检查下需配置

Include conf/httpd-wdl.conf
Include conf/vhost/*.conf
LimitRequestLine 409600
LimitRequestFieldSize 409600

2.修改 /newdisk/wdlinux/httpd-2.2.24/conf/vhost

00000.default.conf

<VirtualHost *:80>
DocumentRoot /www/web/default
</VirtualHost>
<Directory /www/web/default>
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

3.检查防火墙

[root@iposvm6 ~]# iptables -I INPUT -p tcp --dport 80 -j ACCEPT

[root@iposvm6 ~]# service httpd restart
Stopping httpd: [  OK  ]
Starting httpd: [Thu Oct 15 12:02:47 2015] [warn] NameVirtualHost 10.254.1.65:80 has no VirtualHosts

你可能感兴趣的:(更改apatch端口为80, [warn] NameVirtualHost 10.254.1.65:80 has no VirtualHosts)