Apache / Default page
I have apache running on my centos box and I'm using it to serve up MediaWiki. Right now my Root Dir in my http.conf file is "/var/www/html", and my MediaWiki instance lives at "/var/www/html/qawiki". Lets say my machine is www.mymachine.com, and I want the mediawiki instance to be loaded by default if you go to that address instead of having to to to www.mymachine.com/qawiki, what is the best way to do this. I would assume that if I just changed the Root Dir and Document Root in my http.conf I could accomplish this, but if I make those changes, I cannot load mediawiki properly. Thanks.
|
One option is to create a redirect from "www.mymachine.com" to "www.mymachine.com/qawiki/index.htm" (or whatever the index file is for qawiki).
Or you could move the entire contents of /var/www/html/qawiki/ to /var/www/html/. Someone else might have a more elegant method as well. |
You could use virtual host. Define yout desired url and exact path of directory. Now you can access yiur web project without moving anything. Just define url in /etc/hosts file.
|
The virtual host is FAR more elegant but you would either need to add an entry in /etc/hosts in all systems that need to contact the wiki or run a DNS server? Am I correct on that?
|
Can't say elegant but much beneficial locally.
because if he is using apache, web project should be in php (I hope it is not perl) and if he is using php, header direct is very common thing, as I thought. Quote:
|
All times are GMT -5. The time now is 08:47 PM. |