PDA

View Full Version : Point Primary domain to something other than /var/www/html



jenlovesty
09-20-2004, 12:37 PM
Can you point your primary domain to another folder other than /var/www/html.

I am trying to run jsp out of our root directory. It would be easy if I could point our primary domain avbooksinc.com to the following directory:

/var/tomcat4/webapps

so i can run the following page:

http://www.avbooksinc.com/index.jsp

When I log into domain management, there is no way to change it. I did see that in the http.conf folder that the following line of code points to the files folders:

DocumentRoot /var/www/html

Can I change this line to:

DocumentRoot /var/tomcat4/webapps

So that it points to the root directory for tomcat?

Thanks

Jen

FZ
09-23-2004, 12:50 PM
Strange that no one has replied to your topic 3 days later! Anyway, I think you should be able to get it working by modifying the Apache configuration like you say. The only thing to be aware of would be to ensure you make a backup of the original httpd.conf, and replace all occurrences of /var/www/html with your new root. I suppose as a trial you could create a subdomain which points to your /var/tomcat4/webapps directory to see if everything works as you need it to or not. If it does, you should be safe with the real switch.

Let us know how it goes.

jalal
09-23-2004, 02:46 PM
I think that Jen solved the problem in another thread somewhere...

But, I suspect that changing the DocumentRoot like that could disable the Site Manager and User Managers, don't you think?

FZ
09-23-2004, 03:02 PM
Hmm, yeah I didn't consider that. I know it would definitely break functionality in places, but if the site requires it then what can you do? I suppose there are other ways of doing it. Maybe symlinking /var/www/html/ to /var/tomcat4/webapps?

torrin
09-23-2004, 06:01 PM
Is there something wrong with . . .

mv /var/tomcat4/webapps/* /var/www/html/