ASP 4.0.2 with Apache proxy

Hello,

I installed ASP 4.0.2 on my webserver (FC3, apache 2.0) and everything seems to work fine. I can work with the admin tool and so I allow some virtual hosts to accept asp pages. So far so good. No error messages.

So I put a test.asp file (writing 'hello world') in one of the added virtual hosts and then problem began. The test.asp did no show anything (?). OK, I put this file in /opt/casp/admin/web directory and made a DNS entry (asp.teurlings.biz) and a proxy connection to the web server on port 5100 for this url (on my network I start the admin tool by using teur_004.teurlings.biz:5100). Started the url with test.asp and everything works fine... So ASP 4.0.2 can handle this file correctly.

But why not from the URL of the virtual host?

I have a feeling that this is because of the proxy I use. All the web request first go to the proxy server and this servers redirects them to the appropriate web server. I can not go around this proxy, so this is a must.

=====================================================================

My configuration:

I have a proxy server and a web server.

Proxy server httpd.conf settings (Teur_001)(apache 2.0):

...

...

<IfModule mod_proxy.c>

ProxyRequests Off

<Proxy *>

Order deny,allow

Allow from .teurlings.biz

</Proxy>

ProxyVia On

</IfModule>

...

...

<VirtualHost *:80>

ServerName www.yyy.com

ProxyPass / http://teur_004.teurlings.biz/

ProxyPassReverse / http://teur_004.teurlings.biz/

SetEnv force-proxy-request-1.0 1

SetEnv proxy-nokeepalive 1

ProxyPreserveHost On

</VirtualHost>

...

...

<VirtualHost *:80>

ServerName asp.teurlings.biz

ProxyPass / http://teur_004.teurlings.biz:5100/

ProxyPreserveHost On

</VirtualHost>

...

...

Web server httpd.conf settings (Teur_004)(apache 2.0):

...

...

#

# .Net asp (Mono) installeren

#

LoadModule mono_module modules/mod_mono.so

#-- Sun Java System Active Server Pages

LoadModule casp2_module /opt/casp/module/linux2_i686_optimized/apache_2.0.x/20020903/standard/mod_casp2 .so

#-- Sun Java System Active Server Pages

...

...

...

#AddHandler cgi-script .cgi

AddHandler cgi-script .cgi

AddHandler mono .aspx .ascx .asax .ashx .config .cs .asmx .axd

## Sun Java System Active Server Pages installer

AddHandler chiliasp .asp

AddHandler chiliasp .asa

CaspLib /opt/casp/asp-server-3000

...

...

...

<VirtualHost *:80>

CacheDisable /

AddDefaultCharset ISO-8859-1

SetEnv force-proxy-request-1.0 1

SetEnv proxy-nokeepalive 1

ServerAdmin webmaster@teurlings.biz

DocumentRoot "/mnt/datadisk/www/yyy.com"

ServerName www.yyy.com

</VirtualHost>

...

...

=====================================================================

The url:

http://www.yyy.com/test.asp

=====================================================================

The log files:

Proxy server:

Linux Teur_001.teurlings.biz 2.4.20-31.9 #1 Tue Apr 13 18:04:23 EDT 2004 i686 i686 i386 GNU/Linux

Server version: Apache/2.0.40

Server built:Apr 21 2004 11:49:03

Server's Module Magic Number: 20020628:0

Architecture:32-bit

Server compiled with....

-D APACHE_MPM_DIR="server/mpm/prefork"

-D APR_HAS_SENDFILE

-D APR_HAS_MMAP

-D APR_HAVE_IPV6

-D APR_USE_SYSVSEM_SERIALIZE

-D APR_USE_PTHREAD_SERIALIZE

-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT

-D APR_HAS_OTHER_CHILD

-D AP_HAVE_RELIABLE_PIPED_LOGS

-D HTTPD_ROOT="/etc/httpd"

-D SUEXEC_BIN="/usr/sbin/suexec"

-D DEFAULT_PIDLOG="logs/httpd.pid"

-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"

-D DEFAULT_LOCKFILE="logs/accept.lock"

-D DEFAULT_ERRORLOG="logs/error_log"

-D AP_TYPES_CONFIG_FILE="conf/mime.types"

-D SERVER_CONFIG_FILE="conf/httpd.conf"

Apache-error-log:

[Fri May 11 16:23:01 2007] [error] [client 62.58.36.57] proxy: error reading status line from remote server teur_004.teurlings.biz

[Fri May 11 16:23:01 2007] [error] [client 62.58.36.57] proxy: Error reading from remote server returned by /test.asp

Apache-custom-log:

62.58.36.57 - - [11/May/2007:15:01:29 +0200] "GET /test.asp HTTP/1.1" 302 299 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3"

62.58.36.57 - - [11/May/2007:15:01:30 +0200] "GET / HTTP/1.1" 200 19549 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3"

Web server:

Linux Teur_004.teurlings.biz 2.6.12-1.1372_FC3smp #1 SMP Fri Jul 15 01:30:03 EDT 2005 i686 i686 i386 GNU/Linux

Server version: Apache/2.0.53

Server built:Sep 5 2005 09:28:47

Server's Module Magic Number: 20020903:9

Architecture:32-bit

Server compiled with....

-D APACHE_MPM_DIR="server/mpm/prefork"

-D APR_HAS_SENDFILE

-D APR_HAS_MMAP

-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)

-D APR_USE_SYSVSEM_SERIALIZE

-D APR_USE_PTHREAD_SERIALIZE

-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT

-D APR_HAS_OTHER_CHILD

-D AP_HAVE_RELIABLE_PIPED_LOGS

-D HTTPD_ROOT="/etc/httpd"

-D SUEXEC_BIN="/usr/sbin/suexec"

-D DEFAULT_PIDLOG="logs/httpd.pid"

-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"

-D DEFAULT_LOCKFILE="logs/accept.lock"

-D DEFAULT_ERRORLOG="logs/error_log"

-D AP_TYPES_CONFIG_FILE="conf/mime.types"

-D SERVER_CONFIG_FILE="conf/httpd.conf"

Apache-error-log:

<nothing>

Apache-custom-log:

teur_001.teurlings.biz - - [11/May/2007:16:49:11 +0200] "GET / HTTP/1.1" 200 19549 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3"

ASP 4.0.2:

Access-log:

[Fri May 11 16:49:11 2007] Thread 81926: VHost = www.yyy.com, Request = /test.asp (BEGIN)

[Fri May 11 16:49:11 2007] Thread 81926: VHost = www.yyy.com, Request = /test.asp (END)

Error-log:

<nothing>

Server-3000-log:

Fri May 11 16:23:01 2007 CASPLIB: vhost created - www.yyy.com [/mnt/datadisk/www/yyy.com].

Fri May 11 16:23:01 2007 CASPLIB: asp application / created (or reset).

Admd.conf:

# admd.conf

LoadModule casp2_module /opt/casp/admin/conf/mod_casp2.so

LoadModule xmlbody_module /opt/casp/admin/conf/mod_xmlbody.so

AddHandler xmlbody_handler .xbd

AddHandler chiliasp .asp

AddHandler chiliasp .asa

CaspLib /opt/casp/admin/bin

Port 5100

ServerName teur_004.teurlings.biz

ServerRoot /opt/casp/admin

DocumentRoot /opt/casp/admin

#MaxClients 15

MaxClients 100

StartServers 1

MinSpareServers 1

MaxSpareServers 5

MaxRequestsPerChild 10000000

User nobody

Group nobody

ErrorDocument 404 /notimpl.html

DirectoryIndex default.asp index.asp index.html

ServerType standalone

ResourceConfig /dev/null

AccessConfig /dev/null

ErrorLog logs/error

TransferLog logs/access

<Directory /opt/casp/admin/web/>

Options FollowSymLinks

AuthType Basic

AuthName "ASP Management Server"

AuthUserFile /opt/casp/admin/conf/service.pwd

<Limit GET POST>

require valid-user

</Limit>

</Directory>

=====================================================================

Running program:

root285391 0 08:39 ?00:00:00 /opt/casp/admin/bin/admdog

root28540 28539 0 08:39 ?00:00:00 /opt/casp/admin/bin/admdog

root28541 28540 0 08:39 ?00:00:00 /opt/casp/admin/bin/admdog

root28545 28539 0 08:39 ?00:00:00 /opt/casp/admin/bin/admeng -p:5102 -mt:1

root28547 28545 0 08:39 ?00:00:00 /opt/casp/admin/bin/admeng -p:5102 -mt:1

root28548 28547 0 08:39 ?00:00:00 /opt/casp/admin/bin/admeng -p:5102 -mt:1

root28550 28547 0 08:39 ?00:00:00 /opt/casp/admin/bin/admeng -p:5102 -mt:1

root285581 0 08:39 ?00:00:00 /opt/casp/admin/bin/admd -f /opt/casp/admin/conf/admd.conf

nobody28559 28558 0 08:39 ?00:00:00 /opt/casp/admin/bin/admd -f /opt/casp/admin/conf/admd.conf

root31262 28547 0 08:41 ?00:00:00 /opt/casp/admin/bin/admeng -p:5102 -mt:1

root31263 28547 0 08:41 ?00:00:06 /opt/casp/admin/bin/admeng -p:5102 -mt:1

root31264 28547 0 08:41 ?00:00:00 /opt/casp/admin/bin/admeng -p:5102 -mt:1

root31266 28547 0 08:41 ?00:00:00 /opt/casp/admin/bin/admeng -p:5102 -mt:1

nobody31267 28558 0 08:41 ?00:00:00 /opt/casp/admin/bin/admd -f /opt/casp/admin/conf/admd.conf

nobody14811 28558 0 11:51 ?00:00:00 /opt/casp/admin/bin/admd -f /opt/casp/admin/conf/admd.conf

root166271 0 11:52 ?00:00:00 /opt/casp/asp-server-3000/caspd

root16628 16627 0 11:52 ?00:00:00 /opt/casp/asp-server-3000/caspd

root16629 16628 0 11:52 ?00:00:00 /opt/casp/asp-server-3000/caspd

root16652 16627 0 11:52 ?00:00:00 /opt/casp/asp-server-3000/caspeng -p:3001 -mt:5 -iu

root16653 16652 0 11:52 ?00:00:00 /opt/casp/asp-server-3000/caspeng -p:3001 -mt:5 -iu

root16654 16653 0 11:52 ?00:00:00 /opt/casp/asp-server-3000/caspeng -p:3001 -mt:5 -iu

root16655 16653 0 11:52 ?00:00:00 /opt/casp/asp-server-3000/caspeng -p:3001 -mt:5 -iu

root16656 16653 0 11:52 ?00:00:00 /opt/casp/asp-server-3000/caspeng -p:3001 -mt:5 -iu

root16657 16653 0 11:52 ?00:00:00 /opt/casp/asp-server-3000/caspeng -p:3001 -mt:5 -iu

root16658 16653 0 11:52 ?00:00:00 /opt/casp/asp-server-3000/caspeng -p:3001 -mt:5 -iu

root16659 16653 0 11:52 ?00:00:00 /opt/casp/asp-server-3000/caspeng -p:3001 -mt:5 -iu

root17161 16653 0 11:53 ?00:00:00 /opt/casp/asp-server-3000/caspeng -p:3001 -mt:5 -iu

root17162 16653 0 11:53 ?00:00:01 /opt/casp/asp-server-3000/caspeng -p:3001 -mt:5 -iu

root17163 16653 0 11:53 ?00:00:00 /opt/casp/asp-server-3000/caspeng -p:3001 -mt:5 -iu

root17164 16653 0 11:53 ?00:00:00 /opt/casp/asp-server-3000/caspeng -p:3001 -mt:5 -iu

root17165 16653 0 11:53 ?00:00:00 /opt/casp/asp-server-3000/caspeng -p:3001 -mt:5 -iu

root17166 16653 0 11:53 ?00:00:00 /opt/casp/asp-server-3000/caspeng -p:3001 -mt:5 -iu

root17167 16653 0 11:53 ?00:00:00 /opt/casp/asp-server-3000/caspeng -p:3001 -mt:5 -iu

root17168 16653 0 11:53 ?00:00:00 /opt/casp/asp-server-3000/caspeng -p:3001 -mt:5 -iu

root17169 16653 0 11:53 ?00:00:00 /opt/casp/asp-server-3000/caspeng -p:3001 -mt:5 -iu

root17170 16653 0 11:53 ?00:00:00 /opt/casp/asp-server-3000/caspeng -p:3001 -mt:5 -iu

root17171 16653 0 11:53 ?00:00:00 /opt/casp/asp-server-3000/caspeng -p:3001 -mt:5 -iu

root17172 16653 0 11:53 ?00:00:00 /opt/casp/asp-server-3000/caspeng -p:3001 -mt:5 -iu

root17173 16653 0 11:53 ?00:00:00 /opt/casp/asp-server-3000/caspeng -p:3001 -mt:5 -iu

root17174 16653 0 11:53 ?00:00:00 /opt/casp/asp-server-3000/caspeng -p:3001 -mt:5 -iu

root17175 16653 0 11:53 ?00:00:00 /opt/casp/asp-server-3000/caspeng -p:3001 -mt:5 -iu

root17176 16653 0 11:53 ?00:00:00 /opt/casp/asp-server-3000/caspeng -p:3001 -mt:5 -iu

root17177 16653 0 11:53 ?00:00:00 /opt/casp/asp-server-3000/caspeng -p:3001 -mt:5 -iu

nobody25610 28558 0 14:51 ?00:00:00 /opt/casp/admin/bin/admd -f /opt/casp/admin/conf/admd.conf

OK, it is al lot of info..... But can anyone give me some hint(s) why via a proxy to a virtual host I can not get the test.asp working an why the test.asp does work if I directly proxy it to my web server ? Especially the error log of the proxy server is 'strange'.

So http://www.yyy.com/test.asp doesn抰 work and http://asp.teurlings.biz/test.asp does.

I am working on this issue for quit a while and have not found any solution yet. So if anyone has one, please; I am out of options.

I know it also can be a apache problem.... Also looked for it. Nothing found for a solution.

Thnx

Marc Teurlings

[12320 byte] By [MaTeua] at [2007-11-27 4:07:03]
# 1

You must have done something wrong while your were configuring your virtual host and/or adding ASP applications to it.

Please carefully read the docs and try it once more:

http://docs.sun.com/source/817-2514-10/Ch3_ManageASP13.html

http://docs.sun.com/source/817-2514-10/Ch3_ManageASP10.html

Here is the command line versions:

http://docs.sun.com/source/817-2514-10/Ch5_CommandLine18.html

http://docs.sun.com/source/817-2514-10/Ch5_CommandLine21.html

The issue might also be due to your proxy, you might want to try Sun Proxy Server 4.0.x instead your apache one.

Sultala at 2007-7-12 9:12:14 > top of Java-index,Web & Directory Servers,Web Servers...
# 2

I think I found the solution...

I had ASP 4.0.2 working on an Apache 2.0.53 version (.rpm). But only the admin pages were working (!) To solve this I downloaded and installed Apache 2.0.59 (the latest 2.0.x version). Not with a .rpm (I use fedora core 3) but compiled it fully as a static, with alle the modules included (no DSO).

Due to this the virtual hosts are now also working.

Thanx to everyone who helped me and I hope others - with this kind of problem - will now also have a solution to work to.

Kind regards,

Marc Teurlings

MaTeua at 2007-7-12 9:12:14 > top of Java-index,Web & Directory Servers,Web Servers...