Apache webserver troubleshooting


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Apache webserver troubleshooting
# 1  
Old 07-21-2014
Apache webserver troubleshooting

Need assistance in getting apache installation troubleshooting..

- Compiled source code of apache webserver , Installed and configured apache,
- started apache web server with no errors.
- web browser doesnt open any pages . say "Page cannot be displayed". Need troubleshooting .
- When i type http://hostname:8080 it doesnt open


Code:
303 % /local/tools/apache/bin/httpd -v
Server version: Apache/2.4.9 (Unix)
Server built:   Jul 10 2014 17:21:12

Code:
 /local/tools/apache/bin/apachectl -S
VirtualHost configuration:
ServerRoot: "/local/tools/apache"
Main DocumentRoot: "/local/tools/apache/htdocs"
Main ErrorLog: "/local/tools/apache/logs/error_log"
Mutex default: dir="/local/tools/apache/logs/" mechanism=default
PidFile: "/local/tools/apache/logs/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="weather" id=37274 not_used
Group: name="weather" id=100504 not_used

Code:
300 % ps -ef |grep http
weather  22178     1  0 11:09 ?        00:00:00 /local/tools/apache/bin/httpd -k start
weather  22179 22178  0 11:09 ?        00:00:00 /local/tools/apache/bin/httpd -k start
weather  22180 22178  0 11:09 ?        00:00:00 /local/tools/apache/bin/httpd -k start
weather  22182 22178  0 11:09 ?        00:00:00 /local/tools/apache/bin/httpd -k start

Code:
302 % /local/tools/apache/bin/httpd -t -D DUMP_MODULES
Loaded Modules:
 core_module (static)
 so_module (static)
 http_module (static)
 mpm_event_module (static)
 authn_file_module (shared)
 authn_core_module (shared)
 authz_host_module (shared)
 authz_groupfile_module (shared)
 authz_user_module (shared)
 authz_core_module (shared)
 access_compat_module (shared)
 auth_basic_module (shared)
 reqtimeout_module (shared)
 filter_module (shared)
 mime_module (shared)
 log_config_module (shared)
 env_module (shared)
 headers_module (shared)
 setenvif_module (shared)
 version_module (shared)
 unixd_module (shared)
 status_module (shared)
 autoindex_module (shared)
 dir_module (shared)
 alias_module (shared)

# 2  
Old 07-21-2014
Hi.

Just a couple of quick questions: Exactly which OS are you using? Is Apache listening on port 8080? Are you running a firewall? Is port 8080 open? Are you using SELinux? Are the correct contexts on the files in DocumentRoot set?
# 3  
Old 07-22-2014
Scoot

I am running Redhat 6 , SElinux was enabled,apache is listening to port 8080 and it is open.


Code:
308 % netstat -na | grep 8080
tcp        0      0 149.186.251.174:8080        0.0.0.0:*                   LISTEN

Code:
311 %  grep DocumentRoot /local/tools/apache/conf/httpd.conf
# DocumentRoot: The directory out of which you will serve your
DocumentRoot "/local/tools/apache/htdocs"
    # access content that does not live under the DocumentRoot.

Code:
312 % ls -l /local/tools/apache/htdocs/
total 4
-rw-r--r--. 1 weather weather 53 Jul 16 11:41 sample.html


Error log
Code:
[Mon Jul 21 10:36:10.723280 2014] [mpm_event:notice] [pid 34035:tid 140161124194048] AH00491: caught SIGTERM, shutting down
[Mon Jul 21 10:36:25.073844 2014] [mpm_event:notice] [pid 81038:tid 139893008946944] AH00489: Apache/2.4.9 (Unix) configured -- resuming normal operations
[Mon Jul 21 10:36:25.074062 2014] [core:notice] [pid 81038:tid 139893008946944] AH00094: Command line: '/local/tools/apache/bin/httpd -f /local/tools/apache/
conf/httpd.conf'
[Mon Jul 21 10:40:06.924680 2014] [mpm_event:notice] [pid 81038:tid 139893008946944] AH00491: caught SIGTERM, shutting down
[Mon Jul 21 11:09:33.172809 2014] [mpm_event:notice] [pid 22178:tid 139888978118400] AH00489: Apache/2.4.9 (Unix) configured -- resuming normal operations
[Mon Jul 21 11:09:33.173060 2014] [core:notice] [pid 22178:tid 139888978118400] AH00094: Command line: '/local/tools/apache/bin/httpd'

---------- Post updated 07-22-14 at 10:15 AM ---------- Previous update was 07-21-14 at 12:38 PM ----------

Looks like nobody knows anything about apache !!!!

Last edited by ajayram_arya; 07-21-2014 at 02:50 PM.. Reason: updates on error logs
# 4  
Old 07-22-2014
If you don't get an answer immediately, wait! We are not "on call".

Why have you compiled apache from source? Certainly Redhat must have a package available for it! Compiling from source by hand may cause uncommon problems which we couldn't predict, depending on what configuration you chose.

Having SElinux enabled greatly complicates things. This problem may have nothing to do with your web server.

Do you see anything in /var/log/apache2/access_log ?
# 5  
Old 07-22-2014
Did you forget to replace User and Group in httpd.conf ?

if so try this

Code:
$ apache_user="user"; apache_group="yourgroup"
$ sed -i 's/User daemon/User '"$apache_user"'/g;s/Group daemon/Group '"$apache_group"'/g' httpd.conf

# 6  
Old 07-22-2014
I have added user/group

only one entry for access log.

Code:
/local/tools/apache/logs > more access_log
149.186.251.174 - - [10/Jul/2014:22:14:24 +0000] "GET /" 200 161

# 7  
Old 07-22-2014
I used this to build on Centos as well as on ubuntu, you may try

Code:
./configure --prefix=path/to/http_version \
		    --with-ssl=path/to/ssl_version \
		    --with-z=path/to/zlib_version \
                    --with-apr=path/to/apr_version \
                    --with-apr-util=path/to/apr_utility_version \
                    --with-pcre=path/to/pcre_version  --enable-so

Code:
$ httpd  -v
Server version: Apache/2.4.7 (Unix)

Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Web Development

How to enable x-client-ip address in apache webserver LogFormat?

how to enable x-client-ip address in apache webserver LogFormat i tried below option, but no luck... 1. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined 2. LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy 3.... (0 Replies)
Discussion started by: raghur77
0 Replies

2. Emergency UNIX and Linux Support

Netcat ( nc -l ) as webserver

Dear Linux guru's I am trying to create a webserver using nc (netcat only) on RHEL 7.2 running on bash shell. now the easy thing is to get nc listing to a port and respond back $ while true; do { echo -e 'HTTP/1.0 200 OK\r\n'; set; } | nc -l 7877; done This when called from a... (3 Replies)
Discussion started by: chakrapani
3 Replies

3. HP-UX

Help troubleshooting new Apache installation on HPUX 11.31

Hi Guys! I have a very odd problem while installing Apache in an HPUX 11.31, What I did was downloaded the latest webserver suite from hp software, installed using swinstall, everything was extracted properly. The apache version was 2.2.15 Now the issue comes when I run it, it starts... (3 Replies)
Discussion started by: feliper
3 Replies

4. UNIX for Advanced & Expert Users

apache webserver url redirection

I need help in apache url redirection: I have added the below command in httpd.conf and it is working fine. Redirect http://xyz.com/site/homehttp://abc.com/site/home Can we set a rule such that http://xyz.com/site/* -> http://abc.com/site/* is applied For... (0 Replies)
Discussion started by: raghur77
0 Replies

5. Ubuntu

Apache Server troubleshooting

I'm having issues getting apache to respond to requests outside of my local LAN. If I goto my server URL (www .poillion. com) it says connecting... but never finishes and returns anything. I'm using Ubuntu Server 10.10. a) The DNS is working fine. It's pointed to my cable modem's IP and... (1 Reply)
Discussion started by: lorewap3
1 Replies

6. Solaris

webserver login

how can I get statistics and web analysis for solaris 10 webserver access? what is the file? and what is the tools to analyze it? thanx (2 Replies)
Discussion started by: fsmadi
2 Replies

7. UNIX for Advanced & Expert Users

apache webserver

Can I set up an apache webserver on Mandriva? Looking for the easiest webserver program to install basic webserver just for home use. Any ideas/suggestions much appreciated..... (2 Replies)
Discussion started by: jo calamine
2 Replies

8. OS X (Apple)

Webserver Setup, need help!

Hey guys, does anyone know how I edit, configure the server settings using the terminal? MySQL and PHP was once working. But after frying the Xserve G5 i'm in the middle of rebuilding everything, I believe i need to re-configure the root document directory... but have forgotten how to edit... (1 Reply)
Discussion started by: hype.it
1 Replies

9. UNIX for Advanced & Expert Users

Logout Apache WebServer!

I've just started an Apache WebServer a few days ago. I'm using a web site interface for uses to interact with when they login. There are only 5 accounts for my server at the moment. How would i create a logout link so that when the user wants to end their session and logout I can see this in... (1 Reply)
Discussion started by: cipher
1 Replies
Login or Register to Ask a Question