开发者

Can't connect to Apache server on RHEL6

The issue

Now, I am a complete n00b on Apache, and I could certainly use some help with my current issue. I have installed the httpd rpm's on 3 different systems (all Advantech computers, 1 Box PC, 1 Advanced TCA blade, 1 开发者_如何学CCompact PCI blade, and all have RHEL6 installed). I have configured Apache with files used earlier, on other installations. When I issue the command

# service httpd restart

All goes well and I get this output:

Stopping httpd: [  OK  ]
Starting httpd: httpd: apr_sockaddr_info_get() failed for <PC_Name>
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[  OK  ]

Now, when I try to connect to the machine via Apache, I get the log-in screen asking for the username and password, as you would expect. However, it fails to log-in. When I look at the error_log in /var/log/httpd/, it shows this error message:

[Thu Sep 15 14:24:40 2011] [error] [client 192.168.10.175] (13)Permission denied: Could not open password file: /etc/shadow
[Thu Sep 15 14:24:40 2011] [error] [client 192.168.10.175] PAM: user 'root' - not authenticated: System error

It seems to me that this is either a configuration error, or it has something to do with permissions. Yet I can't seem to find out which. Another interesting fact is, that this only applies to the last two installations(Advanced TCA & Compact PCI), and not the first (Box PC), while all 3 installations are exactly the same.

Additional Info

The way I installed it was install httpd from yum,

# yum install httpd

Next install mod_auth_pam, which is needed by the configuration,

# yum install mod_auth_pam

Then I configured Apache with the files I got from previous installations (which basically is just replacing the configuration files from the standard Apache install), and after that I restarted the Apache service.


For this error "apr_sockaddr_info_get() failed"

You need to properly set your hostname.

hostname actual-non-expired-domain-name.com

Don't forget to set the name in your httpd.conf and in /etc/hosts as well.


I have been able to solve this by setting SELinux to allow Apache requests. This is done by issuing the following command:

semanage permissive -a http_t

Semanage is a utility from the policycoreutils-python package. This should come with the installation medium.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜