系统已经安装了apache+tomcat+php+mysql,但是运行的时候出了问题!!
[root@localhost apache]# ../tomcat/bin/startup.sh
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: /usr/local/jdk
[root@localhost apache]# bin/httpd -S
VirtualHost configuration:
192.168.205.242:80 is a NameVirtualHost
default server 192.168.205.242 (/usr/local/apache/conf/extra/httpd-vhosts.conf:27)
port 80 namevhost 192.168.205.242 (/usr/local/apache/conf/extra/httpd-vhosts.conf:27)
Syntax OK
[root@localhost apache]# /usr/local/apache/bin/apachectl start&
[1] 2265
[root@localhost apache]# netstat -tnl | grep 80
tcp 0 0 ::ffff:127.0.0.1:8005 :::* LISTEN
tcp 0 0 :::8009 :::* LISTEN
tcp 0 0 :::8080 :::* LISTEN
(却只有8080端口处于监听状态,没有80端口!!!)
[root@localhost extra]# more /usr/local/apache/conf/httpd.conf | grep Listen
# Listen: Allows you to bind Apache to specific IP addresses and/or
# Change this to Listen on specific IP addresses as shown below to
#Listen 12.34.56.78:80
Listen 80 //一就能够配置了监听端口
打开:http://192.168.205.242是无法显示该页
打开:http://192.168.205.242:8080可以看到apache信息
所以我觉得:tomcat服务已经正常启动,但是apache不能通过80端口访问,还有就是我在root下建了一个文件info.php 内容就是<? echo phpinfo() ?>,但是访问结果确是空白页
由于对apache不是很熟,所以还希望各位多多指点
以下是我httpd-vhosts.conf的配置
NameVirtualHost 192.168.205.242:80
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost 192.168.205.242:80>
<Directory "/usr/local/tomcat/webapps/ROOT">
DirectoryIndex index.htm index.html index.jsp index.php
</Directory>
ServerAdmin
xxx@xxx.com
DocumentRoot /usr/local/tomcat/webapps/ROOT
ServerName 192.168.205.242
ErrorLog logs/170-error_log
CustomLog logs/170-access_log common
</VirtualHost>