Solved

How do you change the default page on a Linux Web Server?

Posted on 2011-03-06
13
256 Views
Last Modified: 2012-05-11
Hello All--
I have a dedicated Linux box running Fedora with cPanel/WHM installed.  I'd like to change the default page for one of the accounts/domains...

Basically when someone goes to xyz.com, I want them pushed to xyz.com/home1.php, as we're doing some testing.  What is the best way to accomplish this?  Is the default homepage defined somewhere in configuration or would I have to use .htaccess.  If I HAVE to use .htaccess, what is the code?

Thanks!
0
Comment
Question by:nplescher
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
13 Comments
 
LVL 6

Assisted Solution

by:expone
expone earned 500 total points
ID: 35045263
From memory, the default homepage is defined in Apache configuration file:

/etc/httpd/conf/httpd.conf
0
 

Author Comment

by:nplescher
ID: 35045764
Thank you... however, I have multiple accounts on this server.  I only want to make this change for one domain, not server wide...
that file affects all domains.
0
 
LVL 31

Expert Comment

by:farzanj
ID: 35046390
If I understand your question correctly, you need to set a different DocumentRoot for each virtual host in the httpd.conf file.

What do you mean by accounts?  I presume you mean a virtual host.
0
What is a Denial of Service (DoS)?

A DoS is a malicious attempt to prevent the normal operation of a computer system. You may frequently see the terms 'DDoS' (Distributed Denial of Service) and 'DoS' used interchangeably, but there are some subtle differences.

 
LVL 31

Expert Comment

by:farzanj
ID: 35046406
Second, you need your DirectoryIndex to contain home1.php

So you would have something like

DirectoryIndex index.html index.php home1.php
0
 
LVL 31

Expert Comment

by:farzanj
ID: 35046415
I am sorry, I get confused every time I ready your question.

Why do you need .htaccess file? Are you trying to keep the files password protected?

What I need your question is: you need Apache to check home1.php file to be checked inside the document root and the above solution should do it.
0
 

Author Comment

by:nplescher
ID: 35047041
Where is the directory index>
0
 
LVL 31

Expert Comment

by:farzanj
ID: 35047117
In your Apache config file (httpd.conf)

Typical path: /etc/httpd/conf/httpd.conf

Find for DirectoryIndex in the file

Append  home1.php

Save it and restart Apache.

0
 

Accepted Solution

by:
nplescher earned 0 total points
ID: 35047142
Hello All--
Actually, the edit is in APACHE configuration in WHM (Web Host Manager).  There, you can visually edit home document priority.
0
 
LVL 31

Expert Comment

by:farzanj
ID: 35047178
Sorry, I don't understand.  Was my solution wrong?  What was the correct solution?
0
 
LVL 31

Expert Comment

by:farzanj
ID: 35050555
Although I didn't tell by WHM, yet, I think I provided the correct solution.  I provided the care the EE members deserve.  I also believe that my responses were direct and accurate and I tried to understand what was in him mind.  Still if I was missing something, he could have asked.  See the timing of my replies.
0
 

Author Comment

by:nplescher
ID: 35051838
I'm sorry, that solution wasn't what I needed and did nothing for me.  I have no incentive to not credit you the points other than the answer was insufficient.  I don't know how to edit that file and you provided no explanation as to the methodology for editing.  I wanted a graphical tool for editing the default home page, which was plainly available in whm.

Thank you.
0
 
LVL 1

Expert Comment

by:modus_operandi
ID: 35115455
Restarting auto-close process on nplescher's behalf.
 
modus_operandi
EE Admin
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question