LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-03-2008, 05:33 PM   #1
martijnburger
LQ Newbie
 
Registered: Dec 2008
Posts: 20

Rep: Reputation: 0
HTTP Server to proxy TomCat/AJP on multiple IP aliases and SSL


Hi,

I'm trying to setup the following webserver configuration:
1. A Fedora 9 webserver.
1. With multiple IP aliases (currently 6 configured and working)
2. With multiple Tomcat servers (Currently one running OFBiz on port 8080 and 8443)
3. All connected through a HTTPD as a proxy server(was running as a webserver on port 80)

The whole idea is that I can reach Tomcat server instance 1 from IP alias 1, Tomcat server instance 2 from IP alias 2, etc...

I tried to reconfigure the httpd.conf to get the ajp-proxy and ssl working. When restarting httpd (or stopping and starting), it failed. I probably made some stupid error, but running debug mode doesn't make me any wiser why it failed, here's the output:

[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module auth_basic_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module auth_digest_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module authn_file_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module authn_alias_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module authn_anon_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module authn_dbm_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module authn_default_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module authz_host_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module authz_user_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module authz_owner_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module authz_groupfile_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module authz_dbm_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module authz_default_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module ldap_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module authnz_ldap_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module include_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module log_config_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module logio_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module env_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module ext_filter_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module mime_magic_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module expires_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module deflate_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module headers_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module usertrack_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module setenvif_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module mime_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module dav_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module status_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module autoindex_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module info_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module dav_fs_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module vhost_alias_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module negotiation_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module dir_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module actions_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module speling_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module userdir_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module alias_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module rewrite_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module proxy_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module proxy_balancer_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module proxy_ftp_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module proxy_http_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module proxy_connect_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module cache_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module suexec_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module disk_cache_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module file_cache_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module mem_cache_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module cgi_module
[Thu Dec 04 01:07:51 2008] [debug] mod_so.c(246): loaded module ssl_module


So, anyone got an idea why my httpd server failed to start?


Regards,

Martijn
 
Old 12-03-2008, 10:44 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
What output does this produce:

# apachectl -t

?
 
Old 12-04-2008, 04:45 PM   #3
martijnburger
LQ Newbie
 
Registered: Dec 2008
Posts: 20

Original Poster
Rep: Reputation: 0
[root@localhost ~]# apachectl -t
Syntax OK
 
Old 12-04-2008, 04:51 PM   #4
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Hmm. Can you explain what you meant by this, then?

Quote:
Originally Posted by martijnburger
When restarting httpd (or stopping and starting), it failed.
Please copy and paste exact commands/output.
 
Old 12-04-2008, 04:57 PM   #5
martijnburger
LQ Newbie
 
Registered: Dec 2008
Posts: 20

Original Poster
Rep: Reputation: 0
This:

[root@localhost ~]# service httpd status
httpd is stopped
[root@localhost ~]# service httpd start
Starting httpd: [FAILED]
 
Old 12-04-2008, 05:59 PM   #6
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Tail /var/log/messages the next time you try to start it. Any clues?

Also, this might provide a starting point for troubleshooting:
# bash -x /etc/init.d/httpd start

The debug chatter should help narrow things down a bit.
 
Old 12-05-2008, 09:22 AM   #7
martijnburger
LQ Newbie
 
Registered: Dec 2008
Posts: 20

Original Poster
Rep: Reputation: 0
/var/log/messages doesn't give much info.

[root@localhost log]# tail messages
Dec 3 23:45:41 localhost nm-system-settings: ifcfg-fedora: read connection 'System eth0'
Dec 3 23:45:41 localhost nm-system-settings: ifcfg-fedora: Ignoring connection 'System eth0' and its device because NM_CONTROLLED was false.
Dec 3 23:45:42 localhost nm-system-settings: ifcfg-fedora: updating /etc/sysconfig/network-scripts/ifcfg-eth0
Dec 3 23:50:58 localhost kernel: eth0: setting full-duplex.
Dec 3 23:56:15 localhost nm-system-settings: ifcfg-fedora: updating /etc/sysconfig/network-scripts/ifcfg-eth0
Dec 3 23:56:15 localhost nm-system-settings: ifcfg-fedora: parsing /etc/sysconfig/network-scripts/ifcfg-eth0 ...
Dec 3 23:56:15 localhost nm-system-settings: ifcfg-fedora: read connection 'System eth0'
Dec 3 23:56:15 localhost nm-system-settings: ifcfg-fedora: Ignoring connection 'System eth0' and its device because NM_CONTROLLED was false.
Dec 3 23:56:15 localhost nm-system-settings: ifcfg-fedora: updating /etc/sysconfig/network-scripts/ifcfg-eth0
Dec 3 23:56:16 localhost nm-system-settings: ifcfg-fedora: updating /etc/sysconfig/network-scripts/ifcfg-eth0


What seems strange to me is this entry a bit earlier in the messages file:
Dec 3 23:35:57 localhost NetworkManager: <info> (eth0): cleaning up...
Dec 3 23:35:57 localhost NetworkManager: <info> (eth0): taking down device.


I did took down the NetworkManager deamon:
[root@localhost log]# service NetworkManager status
NetworkManager is stopped


Here is the output of the bash export:
[root@localhost log]# bash -x /etc/init.d/httpd start
+ . /etc/rc.d/init.d/functions
++ TEXTDOMAIN=initscripts
++ umask 022
++ PATH=/sbin:/usr/sbin:/bin:/usr/bin
++ export PATH
++ '[' -z '' ']'
++ COLUMNS=80
++ '[' -z '' ']'
+++ /sbin/consoletype
++ CONSOLETYPE=pty
++ '[' -f /etc/sysconfig/i18n -a -z '' -a -z '' ']'
++ . /etc/profile.d/lang.sh
+++ sourced=0
+++ '[' -n en_US.UTF-8 ']'
+++ saved_lang=en_US.UTF-8
+++ '[' -f /root/.i18n ']'
+++ LANG=en_US.UTF-8
+++ unset saved_lang
+++ '[' 0 = 1 ']'
+++ unset sourced
+++ unset langfile
++ unset LANGSH_SOURCED
++ '[' -z '' ']'
++ '[' -f /etc/sysconfig/init ']'
++ . /etc/sysconfig/init
+++ BOOTUP=color
+++ GRAPHICAL=yes
+++ RES_COL=60
+++ MOVE_TO_COL='echo -en \033[60G'
+++ SETCOLOR_SUCCESS='echo -en \033[0;32m'
+++ SETCOLOR_FAILURE='echo -en \033[0;31m'
+++ SETCOLOR_WARNING='echo -en \033[0;33m'
+++ SETCOLOR_NORMAL='echo -en \033[0;39m'
+++ LOGLEVEL=3
+++ PROMPT=yes
+++ AUTOSWAP=no
++ '[' pty = serial ']'
++ '[' color '!=' verbose ']'
++ INITLOG_ARGS=-q
++ __sed_discard_ignored_files='/\(~\|\.bak\|\.orig\|\.rpmnew\|\.rpmorig\|\.rpmsave\)$/d'
+ '[' -f /etc/sysconfig/httpd ']'
+ . /etc/sysconfig/httpd
+ HTTPD_LANG=C
+ INITLOG_ARGS=
+ apachectl=/usr/sbin/apachectl
+ httpd=/usr/sbin/httpd
+ prog=httpd
+ pidfile=/var/run/httpd.pid
+ lockfile=/var/lock/subsys/httpd
+ RETVAL=0
+ case "$1" in
+ start
+ echo -n 'Starting httpd: '
Starting httpd: + LANG=C
+ daemon --pidfile=/var/run/httpd.pid /usr/sbin/httpd
+ local gotbase= force= nicelevel corelimit
+ local pid base= user= nice= bg= pid_file=
+ nicelevel=0
+ '[' --pidfile=/var/run/httpd.pid '!=' -pidfile=/var/run/httpd.pid ']'
+ case $1 in
+ pid_file=/var/run/httpd.pid
+ shift
+ '[' /usr/sbin/httpd '!=' /usr/sbin/httpd ']'
+ '[' -z '' ']'
+ base=httpd
+ __pids_var_run httpd /var/run/httpd.pid
+ local base=httpd
+ local pid_file=/var/run/httpd.pid
+ pid=
+ '[' -f /var/run/httpd.pid ']'
+ return 3
+ '[' -n '' -a -z '' ']'
+ corelimit='ulimit -S -c 0'
+ '[' -n '' ']'
+ '[' color = verbose -a -z '' ']'
+ '[' -z '' ']'
+ /bin/bash -c 'ulimit -S -c 0 >/dev/null 2>&1 ; /usr/sbin/httpd'
+ '[' 1 -eq 0 ']'
+ failure 'httpd startup'
+ local rc=1
+ '[' color '!=' verbose -a -z '' ']'
+ echo_failure
+ '[' color = color ']'
+ echo -en '\033[60G'
+ echo -n '['
[+ '[' color = color ']'
+ echo -en '\033[0;31m'
+ echo -n FAILED
FAILED+ '[' color = color ']'
+ echo -en '\033[0;39m'
+ echo -n ']'
]+ echo -ne '\r'
+ return 1
+ '[' -x /usr/bin/rhgb-client ']'
+ return 1
+ RETVAL=1
+ echo

+ '[' 1 = 0 ']'
+ return 1
+ exit 1


Van you make something of this? :S
 
Old 12-05-2008, 11:50 AM   #8
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by martijnburger
/var/log/messages doesn't give much info.
I was hoping that might show some selinux-related messages.

Quote:
Originally Posted by martijnburger
Here is the output of the bash export:
[root@localhost log]# bash -x /etc/init.d/httpd start
...
+ /bin/bash -c 'ulimit -S -c 0 >/dev/null 2>&1 ; /usr/sbin/httpd'
+ '[' 1 -eq 0 ']'
...
Well, that doesn't tell us much we did not already know (i.e. httpd can't start) - perhaps because stderr is suppressed. Try from the command line, simply:
# /usr/sbin/httpd

Any error message?

If that shows nothing, my next step would be to remove any tomcat directives from httpd.conf (i.e. your connector) and try again.
 
Old 12-06-2008, 08:14 AM   #9
martijnburger
LQ Newbie
 
Registered: Dec 2008
Posts: 20

Original Poster
Rep: Reputation: 0
Thanks for the tips! Here's what I found out commenting out rules in httpd.conf

This virtual host starts:
<VirtualHost 192.168.2.25:80>
ServerAdmin root@localhost
DocumentRoot /var/www/html/
ServerName localhost
# ErrorLog /var/log/httpd/ds_error_log
# LogLevel warn
# CustomLog var/log/httpd/ds_access_log common
ProxyRequests off
ProxyPreserveHost on
ProxyPass / ajp://localhost:8009/
</VirtualHost>


And this one does not:
<VirtualHost 192.168.2.25:80>
ServerAdmin root@localhost
DocumentRoot /var/www/html/
ServerName localhost
ErrorLog /var/log/httpd/ds_error_log
LogLevel warn
CustomLog var/log/httpd/ds_access_log common
ProxyRequests off
ProxyPreserveHost on
ProxyPass / ajp://localhost:8009/
</VirtualHost>

So I am guessing it's some kind of permission issue with the log file?

BTW: Still a lot of other problems, like the SSL Virtual Host won't start and in my webbrowser it gives an internal server error 500, but let's first try to solve this one.
 
Old 12-06-2008, 05:41 PM   #10
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
What happened when you started httpd from the command line as we discussed?

You may need to create the logs for that virtual host:

# touch /var/log/httpd/ds_error_log

# touch /var/log/httpd/ds_access_log
 
Old 12-09-2008, 11:00 AM   #11
martijnburger
LQ Newbie
 
Registered: Dec 2008
Posts: 20

Original Poster
Rep: Reputation: 0
Hmmm, that simple! It works perfect, including SSL etc. Thanks for the tips.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
java proxy server (running on tomcat) t0bias General 0 04-17-2008 08:20 AM
Tomcat server behind SQUID proxy server allauddin Linux - Networking 1 11-15-2007 06:22 AM
Tomcat won't listen on port 8009 for AJP annie_zhou91 Linux - Server 1 09-10-2007 11:49 AM
Apache HTTP Server 2.2.3 with SSL gjagadish Linux - Software 1 01-22-2007 01:15 AM
http proxy server Seiken Slackware 6 12-09-2005 12:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration