views:

292

answers:

0

I have tomcat located here: /work/tomcat So, /work/tomcat/conf is where configuration is located The default webapps are in /work/tomcat/webapps

I have created a folder /work/tomcat/foocom

I have a virtual host set up to the domain foo.com with an appBase="foocom"

I start my server and visit foo.com in the browser and see the index file which displays data from the database.

I click a link that says "create new record" and a page is called that does a simple database insert.

I go back and click the link again, it works fine. I can do this as many times as I want. The site works fine.

At this point I shut my servers (Tomcat, Apache, MySQL) down.

I rename /work/tomcat/foocom to /work/tomcat/myfoocom.

I change the virtual host entry to be for myfoo.com appBase="myfoocom"

So, in my /work/tomcat folder is now /work/tomcat/myfoocom, foocom no longer exists.

The only virtual host entry is myfoo.com, foo.com no longer exists.

All I have done here is change the domain name.

The page that does the database insert has no reference to domain or any absolute mappings.

I restart my slice, restart my services and now try to visit myfoo.com

The site works, I see the index page and the entries from the database are displayed properly.

This means the virtual hosts are working fine, so is the database. I can see it at myfoo.com

I click the link to do a database insert, it works.

I click the link to do a second database insert... I get a stack overflow error.

Every insert after that gives me a stack overflow error.

I stop my services, rename myfoocom back to foocom and change the virtual host back to foo.com

I restart my services and visit foo.com and everything works, no stack overflow.

Simply changing the domain name causes the stack overflow error to begin happening.