From tux at holovaty.com Thu Mar 3 16:33:06 2005 From: tux at holovaty.com (Adrian Holovaty) Date: Thu, 3 Mar 2005 10:33:06 -0600 Subject: Passing 404s to Apache? Message-ID: <200503031033.06593.tux@holovaty.com> Hello, Is it possible to configure Tux to pass all 404s to Apache, so that Apache can perform an action (rewriting, redirecting, etc.) on the URL if necessary? I found a message from 2003 in the list archives that asked the same question, but it wasn't answered: http://www.redhat.com/archives/tux-list/2003-October/msg00004.html I'm on Tux 3.2.19 on Red Hat ES. Thanks for any help. Adrian From williama_lovaton at coomeva.com.co Thu Mar 3 17:05:52 2005 From: williama_lovaton at coomeva.com.co (William Lovaton) Date: Thu, 03 Mar 2005 12:05:52 -0500 Subject: Passing 404s to Apache? In-Reply-To: <200503031033.06593.tux@holovaty.com> References: <200503031033.06593.tux@holovaty.com> Message-ID: <1109869552.31491.100.camel@nalwalovaton> Adrian, AFAIK, tux works that way. Let's say you configure it to pass through the .php requests and statics requests are handled by tux. If you make a request to a non valid URL, even if it is static (.html, .css, .js, images, etc), tux will pass the request to apache to be handled. So apache has the last word in declaring whether the request is a 404 or not. At least that's the way I see it in my setup. -William El jue, 03-03-2005 a las 10:33 -0600, Adrian Holovaty escribi?: > Hello, > > Is it possible to configure Tux to pass all 404s to Apache, so that Apache can > perform an action (rewriting, redirecting, etc.) on the URL if necessary? > > I found a message from 2003 in the list archives that asked the same question, > but it wasn't answered: > http://www.redhat.com/archives/tux-list/2003-October/msg00004.html > > I'm on Tux 3.2.19 on Red Hat ES. Thanks for any help. > > Adrian > > _______________________________________________ > tux-list mailing list > tux-list at redhat.com > https://www.redhat.com/mailman/listinfo/tux-list From mcd at daviesinc.com Thu Mar 3 18:40:30 2005 From: mcd at daviesinc.com (Chris Davies) Date: Thu, 03 Mar 2005 13:40:30 -0500 Subject: Passing 404s to Apache? In-Reply-To: <200503031033.06593.tux@holovaty.com> References: <200503031033.06593.tux@holovaty.com> Message-ID: <1109875230.4768.123.camel@tsavo> Tux does that by default. Just don't make the mistake of having a file called 404.html in your root directory. Looking at that article, there are 3 things that make me think something isn't right. 1, there is a ? in the url which Tux will pass to the backend 2, php, unless tux.mime.types isn't set to redirect php, Tux would parse it 3, I believe tux logs the 404 even though it passes it to the backend On Thu, 2005-03-03 at 10:33 -0600, Adrian Holovaty wrote: > Hello, > > Is it possible to configure Tux to pass all 404s to Apache, so that Apache can > perform an action (rewriting, redirecting, etc.) on the URL if necessary? From tux at holovaty.com Thu Mar 3 20:31:00 2005 From: tux at holovaty.com (Adrian Holovaty) Date: Thu, 3 Mar 2005 14:31:00 -0600 Subject: Passing 404s to Apache? In-Reply-To: <1109875230.4768.123.camel@tsavo> References: <200503031033.06593.tux@holovaty.com> <1109875230.4768.123.camel@tsavo> Message-ID: <200503031431.00737.tux@holovaty.com> Thanks for your quick responses! My experience, though, suggests that it isn't default Tux behavior to pass 404s. Here's what I did; maybe somebody can point out what I overlooked -- 1. Started Tux, with default parameters. 2. Changed "Listen 80" to "Listen 8080" in Apache configuration and restarted Apache. 3. Went to a page in my Web browser that Apache knows how to handle (but whose file doesn't exist on the filesystem) -- but got the standard Tux "Page not found" message, rather than the Apache page. I expected Tux to pass the 404 to Apache, which would then handle the page. Adrian From mcd at daviesinc.com Thu Mar 3 20:51:56 2005 From: mcd at daviesinc.com (Chris Davies) Date: Thu, 03 Mar 2005 15:51:56 -0500 Subject: Passing 404s to Apache? In-Reply-To: <200503031431.00737.tux@holovaty.com> References: <200503031033.06593.tux@holovaty.com> <1109875230.4768.123.camel@tsavo> <200503031431.00737.tux@holovaty.com> Message-ID: <1109883116.4768.140.camel@tsavo> What is the tux docroot? What version of Apache? What port is tux set to redirect to? sysctl.tux or something similar What does your apache config look like? Turn on dprintk in tux (sysctl.tux) and LogLevel debug in Apache Is the request showing up in the error log? My guess is that you are using Apache1 and NameVirtualHost. Try: NameVirtualHost 1.2.3.4:80 and in your virtualserver config VirtualHost 1.2.3.4:80 Yes, I know its not 8080, but, apache1's virtual mapping is a bit screwy and thus you might be getting a hash miss in the domain name. On Thu, 2005-03-03 at 14:31 -0600, Adrian Holovaty wrote: > Thanks for your quick responses! My experience, though, suggests that it isn't > default Tux behavior to pass 404s. Here's what I did; maybe somebody can > point out what I overlooked -- From aergis at gmail.com Mon Mar 7 01:21:22 2005 From: aergis at gmail.com (Armen Eyal) Date: Mon, 7 Mar 2005 02:21:22 +0100 Subject: virtual hosts, file mapping Message-ID: <3b21327405030617214136bf9@mail.gmail.com> i don't know how to modify tux kernel patch to map objectnames to files, and since kernel compilation, reboots take a while, i'm looking for some help eg. /X/key/file -> /home/y/file any hint where could i put a code like this if( ! strncmp(req->objectname,"/X/",3) ) { char *key = NULL; if( ! (key= strchr( req->objectname+3, '/' )) ) return ACCESS_DENIED; *key = 0; if( checkKey( req, key+1 ) < 0 ) return ACCESS_DENIED; *key = '/'; sprintf( fileToSend, "/home%s", key ); } From sitz at onastick.net Sat Mar 12 20:10:28 2005 From: sitz at onastick.net (Noah) Date: Sat, 12 Mar 2005 15:10:28 -0500 Subject: kernel BUG at fs/namei.c:518! running TUX + grsecurity on 2.6.11.2 Message-ID: <20050312201028.GA24299@radu.onastick.net> Got the attached BUG when starting TUX on my newly upgraded-to-2.6 system. Kernel is: vanilla 2.6.11.2 + grsecurity-2.1.3-2.6.11-200503111604.patch tux3-2.6.11-rc2-bk6-A7 The only hand-patching I had to do was in linux/kernel/exit.c , where I did this: if (group_dead) acct_process(code); if (current->tux_info) { #ifdef CONFIG_TUX_DEBUG printk("Possibly unexpected TUX-thread exit(%ld) at %p?\n", code, __builtin_return_address(0)); #endif current->tux_exit(); } gr_acl_handle_psacct(tsk, code); gr_acl_handle_exit(); gr_del_task_from_ip_table(tsk); exit_mm(tsk); (This hand-patch was also required when using tux3-2.4.23-A3 with linux-2.4.29 and tux-3.2.16, but the BUG was not seen with that combination). Tux's docroot is /var/www/sites/tux, which contains symlinks to symlinks to the actual docroot for the various virtually hosted sites on the server. example: /var/www/sites/tux/example.com -> /var/www/sites/example.com -> /var/www/users/example_user/example.com The kernel .config is attached. Let me know what (if anything) else you need; thanks. =) --n -- dd of=/dev/fd0 if=/dev/flippy bs=1024 ^^^ Making Flippy Floppy -------------- next part -------------- Mar 12 14:22:07 radu kernel: TUX: logger thread started. Mar 12 14:22:07 radu kernel: TUX: thread 0 listens on http://207.44.150.54:80. Mar 12 14:22:10 radu kernel: ------------[ cut here ]------------ Mar 12 14:22:10 radu kernel: kernel BUG at fs/namei.c:518! Mar 12 14:22:10 radu kernel: invalid operand: 0000 [#1] Mar 12 14:22:10 radu kernel: Modules linked in: tux zlib_deflate Mar 12 14:22:10 radu kernel: CPU: 0 Mar 12 14:22:10 radu kernel: EIP: 0060:[link_path_walk+1816/3056] Not tainted VLI Mar 12 14:22:10 radu kernel: EFLAGS: 00010296 (2.6.11.2-gt) Mar 12 14:22:10 radu kernel: eax: d779c020 ebx: d7c905c0 ecx: d7764000 edx: 00000001 Mar 12 14:22:10 radu kernel: esi: ffffffd8 edi: d7764f50 ebp: d7764df0 esp: d7764db4 Mar 12 14:22:10 radu kernel: ds: 007b es: 007b ss: 0068 Mar 12 14:22:10 radu kernel: Process async IO 0/1 (pid: 30245, threadinfo=d7764000 task=d779c020) Mar 12 14:22:10 radu kernel: Stack: d7764f50 dae7b000 d7764f50 00000000 d7764f50 d7764000 00000000 00000001 Mar 12 14:22:10 radu kernel: 00000000 dae7b354 df7e49e0 d7c905c0 725af893 0000000c dae7b348 d7764f4c Mar 12 14:22:10 radu kernel: c016961c e03281f4 dae7b000 e032dd38 dae7b000 dae7b348 d7764f50 d7764f4c Mar 12 14:22:10 radu kernel: Call Trace: Mar 12 14:22:10 radu kernel: [path_walk+28/32] Mar 12 14:22:10 radu kernel: [pg0+536343028/1069896704] Mar 12 14:22:10 radu kernel: [pg0+536366392/1069896704] Mar 12 14:22:10 radu kernel: [vsnprintf+1067/1132] Mar 12 14:22:10 radu kernel: [pg0+536366695/1069896704] Mar 12 14:22:10 radu kernel: [sprintf+20/24] Mar 12 14:22:10 radu kernel: [pg0+536342414/1069896704] Mar 12 14:22:10 radu kernel: [pg0+536346664/1069896704] Mar 12 14:22:10 radu kernel: [pg0+536346436/1069896704] Mar 12 14:22:10 radu kernel: [default_wake_function+0/28] Mar 12 14:22:10 radu kernel: [default_wake_function+0/28] Mar 12 14:22:10 radu kernel: [kernel_thread_helper+5/12] Mar 12 14:22:10 radu kernel: Code: 8b 5d f0 be d8 ff ff ff 83 b8 b8 01 00 00 04 0f 8f 31 02 00 00 83 b8 bc 01 00 00 27 0f 8f 24 02 00 00 8b 7d d4 83 7f 1c 04 76 08 <0f> 0b 06 02 e0 e5 2a c0 e8 63 e8 12 00 8b 55 d4 8b 42 04 50 53 Mar 12 14:22:15 radu kernel: ------------[ cut here ]------------ Mar 12 14:22:15 radu kernel: kernel BUG at fs/namei.c:518! Mar 12 14:22:15 radu kernel: invalid operand: 0000 [#2] Mar 12 14:22:15 radu kernel: Modules linked in: tux zlib_deflate Mar 12 14:22:15 radu kernel: CPU: 0 Mar 12 14:22:15 radu kernel: EIP: 0060:[link_path_walk+1816/3056] Not tainted VLI Mar 12 14:22:15 radu kernel: EFLAGS: 00010206 (2.6.11.2-gt) Mar 12 14:22:15 radu kernel: eax: d779c560 ebx: d7c905c0 ecx: d7d3b000 edx: 00000001 Mar 12 14:22:15 radu kernel: esi: ffffffd8 edi: d7d3bec0 ebp: d7d3bd60 esp: d7d3bd24 Mar 12 14:22:15 radu kernel: ds: 007b es: 007b ss: 0068 Mar 12 14:22:15 radu kernel: Process tux (pid: 4484, threadinfo=d7d3b000 task=d779c560) Mar 12 14:22:15 radu kernel: Stack: d7d3bec0 dbab6000 d7d3bec0 e05cbafe d7d3bec0 d7d3b000 00000000 00000001 Mar 12 14:22:15 radu kernel: 00000040 dbab6354 df7e49e0 d7c905c0 725af893 0000000c dbab6348 d7d3bebc Mar 12 14:22:15 radu kernel: c016961c e03281f4 dbab6000 e032dd38 dbab6000 dbab6348 d7d3bec0 d7d3bebc Mar 12 14:22:15 radu kernel: Call Trace: Mar 12 14:22:15 radu kernel: [path_walk+28/32] Mar 12 14:22:15 radu kernel: [pg0+536343028/1069896704] Mar 12 14:22:15 radu kernel: [pg0+536366392/1069896704] Mar 12 14:22:15 radu kernel: [skb_copy_datagram_iovec+64/440] Mar 12 14:22:15 radu kernel: [cleanup_rbuf+206/244] Mar 12 14:22:15 radu kernel: [release_sock+81/84] Mar 12 14:22:15 radu kernel: [tcp_recvmsg+1621/1680] Mar 12 14:22:15 radu kernel: [pg0+536344182/1069896704] Mar 12 14:22:15 radu kernel: [try_to_wake_up+29/132] Mar 12 14:22:15 radu kernel: [pg0+536366695/1069896704] Mar 12 14:22:15 radu kernel: [pg0+536339657/1069896704] Mar 12 14:22:15 radu kernel: [pg0+536345671/1069896704] Mar 12 14:22:15 radu kernel: [pg0+536342414/1069896704] Mar 12 14:22:15 radu kernel: [pg0+536345978/1069896704] Mar 12 14:22:15 radu kernel: [pg0+536388138/1069896704] Mar 12 14:22:15 radu kernel: [pg0+536394972/1069896704] Mar 12 14:22:15 radu kernel: [sys_chdir+111/124] Mar 12 14:22:15 radu kernel: [sys_tux+37/132] Mar 12 14:22:15 radu kernel: [syscall_call+7/11] Mar 12 14:22:15 radu kernel: Code: 8b 5d f0 be d8 ff ff ff 83 b8 b8 01 00 00 04 0f 8f 31 02 00 00 83 b8 bc 01 00 00 27 0f 8f 24 02 00 00 8b 7d d4 83 7f 1c 04 76 08 <0f> 0b 06 02 e0 e5 2a c0 e8 63 e8 12 00 8b 55 d4 8b 42 04 50 53 Mar 12 14:22:15 radu kernel: <5>TUX: thread 0 stopping ... From mark at ScheduleWorld.com Fri Mar 18 22:31:47 2005 From: mark at ScheduleWorld.com (Mark Swanson) Date: Fri, 18 Mar 2005 17:31:47 -0500 Subject: tux/fedora core 3 doesn't forward requests Message-ID: <423B56D3.6010109@ScheduleWorld.com> Hello, I've been using Tux successfully for several years. However, after upgrading to Fedora Core 3 I can no longer get Tux to forward requests to a client http server (tomcat, port 8080). Has anyone been able to do this with Fedora core 3? Thanks. -- Free replacement for Exchange and Outlook (Contacts and Calendar) http://www.ScheduleWorld.com/ WAP: http://www.ScheduleWorld.com/sw/WAPToday?id=4000&tz=EST WebDAV: http://www.ScheduleWorld.com/sw/webDAVDir/4000.ics VFREEBUSY: http://www.ScheduleWorld.com/sw/freebusy/4000.ifb From mark at ScheduleWorld.com Fri Mar 18 22:38:06 2005 From: mark at ScheduleWorld.com (Mark Swanson) Date: Fri, 18 Mar 2005 17:38:06 -0500 Subject: tux/fedora core 3 doesn't forward requests In-Reply-To: <423B56D3.6010109@ScheduleWorld.com> References: <423B56D3.6010109@ScheduleWorld.com> Message-ID: <423B584E.9010301@ScheduleWorld.com> Mark Swanson wrote: > Hello, > > I've been using Tux successfully for several years. However, after > upgrading to Fedora Core 3 I can no longer get Tux to forward requests > to a client http server (tomcat, port 8080). > > Has anyone been able to do this with Fedora core 3? I should mention that I'm on X86_64, latest Fedora core 3 upgraded via yum (kernel *770). -- Free replacement for Exchange and Outlook (Contacts and Calendar) http://www.ScheduleWorld.com/ WAP: http://www.ScheduleWorld.com/sw/WAPToday?id=4000&tz=EST WebDAV: http://www.ScheduleWorld.com/sw/webDAVDir/4000.ics VFREEBUSY: http://www.ScheduleWorld.com/sw/freebusy/4000.ifb From info at a-wing.co.uk Fri Mar 18 23:05:42 2005 From: info at a-wing.co.uk (Andrew Hutchings) Date: Fri, 18 Mar 2005 23:05:42 +0000 Subject: tux/fedora core 3 doesn't forward requests In-Reply-To: <423B584E.9010301@ScheduleWorld.com> References: <423B56D3.6010109@ScheduleWorld.com> <423B584E.9010301@ScheduleWorld.com> Message-ID: <423B5EC6.2000209@a-wing.co.uk> Hi Mark, The 2.6.10 kernels in Fedora Core 3 don't seem to have tux compiled in. I have no idea why. Regards Andrew Mark Swanson wrote: > Mark Swanson wrote: > >> Hello, >> >> I've been using Tux successfully for several years. However, after >> upgrading to Fedora Core 3 I can no longer get Tux to forward requests >> to a client http server (tomcat, port 8080). >> >> Has anyone been able to do this with Fedora core 3? > > > I should mention that I'm on X86_64, latest Fedora core 3 upgraded via > yum (kernel *770). > > -- Andrew Hutchings (A-Wing) Linux Guru - Netserve Consultants Ltd. - http://www.domaincity.co.uk/ Random Quote from linuxcookie: "We all know Linux is great...it does infinite loops in 5 seconds." (Linus Torvalds about the superiority of Linux on the Amterdam Linux Symposium) From mark at ScheduleWorld.com Fri Mar 18 23:33:26 2005 From: mark at ScheduleWorld.com (Mark Swanson) Date: Fri, 18 Mar 2005 18:33:26 -0500 Subject: tux/fedora core 3 doesn't forward requests In-Reply-To: <423B5EC6.2000209@a-wing.co.uk> References: <423B56D3.6010109@ScheduleWorld.com> <423B584E.9010301@ScheduleWorld.com> <423B5EC6.2000209@a-wing.co.uk> Message-ID: <423B6546.4070108@ScheduleWorld.com> Andrew Hutchings wrote: > Hi Mark, > > The 2.6.10 kernels in Fedora Core 3 don't seem to have tux compiled in. > I have no idea why. Thanks for responding Andrew. However, maybe it's a x86_64 thing, but Tux is distributed as a module in Fedora Core 3 / 2.6.10/770. More info: I have configured my machine with identical settings to my other dev/qa/prod Linux machines running Tux. I have spent several hours searching google and trying different Tux settings to try to determine if something broke. The two Tux proc debug settings give information to the logs but it hasn't helped me figure out what's wrong. All suggestions warmly welcomed. -- Free replacement for Exchange and Outlook (Contacts and Calendar) http://www.ScheduleWorld.com/ WAP: http://www.ScheduleWorld.com/sw/WAPToday?id=4000&tz=EST WebDAV: http://www.ScheduleWorld.com/sw/webDAVDir/4000.ics VFREEBUSY: http://www.ScheduleWorld.com/sw/freebusy/4000.ifb