LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-03-2013, 11:10 AM   #1
js82
LQ Newbie
 
Registered: Mar 2013
Posts: 4

Rep: Reputation: Disabled
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.
 
Old 06-03-2013, 02:54 PM   #2
spazticclown
Member
 
Registered: Sep 2010
Distribution: Fedora, Android, CentOS
Posts: 91
Blog Entries: 2

Rep: Reputation: 21
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.
 
Old 06-04-2013, 10:37 AM   #3
eklavya
Member
 
Registered: Mar 2013
Posts: 619

Rep: Reputation: 136Reputation: 136
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.
 
Old 06-04-2013, 10:44 AM   #4
spazticclown
Member
 
Registered: Sep 2010
Distribution: Fedora, Android, CentOS
Posts: 91
Blog Entries: 2

Rep: Reputation: 21
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?
 
Old 06-05-2013, 04:54 AM   #5
eklavya
Member
 
Registered: Mar 2013
Posts: 619

Rep: Reputation: 136Reputation: 136
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:
header('Location: http://www.mymachine.com/qawiki');
He can put this line in index.php of MediaWiki so whenever anyone will try to open MediaWiki, it will take him on http://www.mymachine.com/qawiki
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Default Apache 2 Page linutzy Linux - Newbie 7 08-02-2005 07:18 PM
Apache default page dienerk Linux - General 4 10-22-2004 01:02 PM
I cant change the default test page in apache server to add my page.y nhemapriya Linux - Newbie 3 05-13-2004 12:35 PM
Apache default page?? andy18 Linux - General 6 07-16-2003 02:57 AM
apache default page davee Linux - Newbie 6 02-17-2003 09:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration