如何设置CentOS7使用面向公众的IP和虚拟主机的多个站点

我试图让我的centOS7networking服务器可以被外部用户查看。 我已经添加我的公共IP地址到我的服务器使用:

sudo nmtui编辑ens160

和我的虚拟主机文件如下所示:

NameVirtualHost *:80 <VirtualHost 65.51.XXX.XXX> ServerAdmin [email protected] ServerName 65.51.XXX.XXX ServerAlias 65.51.XXX.XXX DocumentRoot /var/www/html/example.com/public_html/ <Directory "/var/www/html/example.com/public_html/"> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny Allow from all </Directory> #ErrorLog /var/www/html/example.com/logs/error.log #CustomLog /var/www/html/example.com/logs/access.log combined </VirtualHost> 

在我的httpd.conf中我添加了:

 Listen 65.51.XXX.XXX:80 

当我从networking中的计算机或networking外的计算机inputIP地址时,我什么也没有得到。

这个服务器最终将主持更多的网站,如果这与什么导致问题有关。