HTTP Server to proxy TomCat/AJP on multiple IP aliases and SSL
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
[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
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.