LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 07-29-2005, 12:20 AM   #1
linutzy
LQ Newbie
 
Registered: Jul 2005
Posts: 17

Rep: Reputation: 0
Default Apache 2 Page


Quick question (I guess I'm just scared of breaking apache)

How do you get rid of the default page when you install apache 2.

It looks something like this :.fakedomain.com/apache2-default/

I did the install using apt-get and it's online and up and running. Just wondering how to get rid of /apache2-default/ and not break any other directives.


Please help.
 
Old 07-29-2005, 03:47 AM   #2
cdhgee
Member
 
Registered: Oct 2003
Location: St Paul, MN
Distribution: Fedora 8, Fedora 9
Posts: 513

Rep: Reputation: 30
Just overwrite the index.html file in the Apache document root directory - usually /var/www/html when you install Apache 2.
 
Old 07-29-2005, 03:57 AM   #3
linutzy
LQ Newbie
 
Registered: Jul 2005
Posts: 17

Original Poster
Rep: Reputation: 0
Okay there is a file.........

There is a directory called /var/www/apache2-default/ should I overwrite that directory name? If I look inside it I see:

apache_pb2_ani.gif index.html.et index.html.pt-br
apache_pb2.gif index.html.fr index.html.ru.cp-1251
apache_pb2.png index.html.he.iso8859-8 index.html.ru.cp866
apache_pb.gif index.html.hr.iso8859-2 index.html.ru.iso-ru
apache_pb.png index.html.it index.html.ru.koi8-r
index.html.ca index.html.ja.iso2022-jp index.html.ru.utf8
index.html.cz.iso8859-2 index.html.ko.euc-kr index.html.sv
index.html.de index.html.lb.utf8 index.html.var
index.html.dk index.html.nl index.html.zh-cn.gb2312
index.html.ee index.html.nn index.html.zh-tw.big5
index.html.el index.html.no robots.txt
index.html.en index.html.po.iso8859-2
index.html.es index.html.pt
 
Old 07-29-2005, 04:34 AM   #4
cdhgee
Member
 
Registered: Oct 2003
Location: St Paul, MN
Distribution: Fedora 8, Fedora 9
Posts: 513

Rep: Reputation: 30
Yeah, that's the directory. You can delete (or move) everything in that directory and replace it with your own content that you want your webserver to serve.
 
Old 07-29-2005, 03:10 PM   #5
muldereric
LQ Newbie
 
Registered: Jul 2005
Distribution: RH9 2.4.20-8
Posts: 16

Rep: Reputation: 0
Or you edit the /etc/httpd.conf and put # (comment) in front of the directives which are used to point at that directory you mentioned
 
Old 07-29-2005, 04:20 PM   #6
cdhgee
Member
 
Registered: Oct 2003
Location: St Paul, MN
Distribution: Fedora 8, Fedora 9
Posts: 513

Rep: Reputation: 30
If you do take mulderic's suggestion though, make sure you put in an alternative statement specifying a new directory for the document root.

Last edited by cdhgee; 07-29-2005 at 04:23 PM.
 
Old 08-02-2005, 01:05 PM   #7
linutzy
LQ Newbie
 
Registered: Jul 2005
Posts: 17

Original Poster
Rep: Reputation: 0
Delete

Man you guys will have to excuse me but I'm going through the man pages like crazy. I will choose to delete the file, are there any reasons why I should keep it.

Also after doing a google search are there any "beginner guide to home admin for apache2 sites" I'm dedicated to running this box the right way not a half-a$$ed way?

Also I hope you don't mind me asking but to start things off I have two users. I want one to have cgi access and both to have PHP/MYSQL access. The users are already created using adduser, just wondering if I have forgotten something? PHP and MYSQL have been installed via a .deb package using stable 3.1


Once the /apache-default/ file is deleted do I have to make any other changes in other directories in /var/www so that the users can have :www.example.com/~username/ load their page, and where do I put the index.html file to load the start page for www.example.com.


I'll keep reading but only have an old apache 1.3 book. I really and I mean really do thank you for the help. I'm looking at all the noob impossible statements in all the apache directories.

Last edited by linutzy; 08-02-2005 at 01:16 PM.
 
Old 08-02-2005, 07:18 PM   #8
muldereric
LQ Newbie
 
Registered: Jul 2005
Distribution: RH9 2.4.20-8
Posts: 16

Rep: Reputation: 0
Re: Delete

Quote:
Originally posted by linutzy
Man you guys will have to excuse me but I'm going through the man pages like crazy. I will choose to delete the file, are there any reasons why I should keep it.

Also after doing a google search are there any "beginner guide to home admin for apache2 sites" I'm dedicated to running this box the right way not a half-a$$ed way?

Also I hope you don't mind me asking but to start things off I have two users. I want one to have cgi access and both to have PHP/MYSQL access. The users are already created using adduser, just wondering if I have forgotten something? PHP and MYSQL have been installed via a .deb package using stable 3.1


Once the /apache-default/ file is deleted do I have to make any other changes in other directories in /var/www so that the users can have :www.example.com/~username/ load their page, and where do I put the index.html file to load the start page for www.example.com.


I'll keep reading but only have an old apache 1.3 book. I really and I mean really do thank you for the help. I'm looking at all the noob impossible statements in all the apache directories.
Deleting the files can be pretty risky. When apache finds and directory which is empty (no starting document like index.html), it wil show (when the current module is loaded (default)) the directory content instead of a page. My advice is to create an empty html document and place that in your website's document root (probably /var/www).
You do not have to change the settings to give each local user its own webspace. Every user has his own webspace which can be found in /home/<user>/public_html/ and can be reached by http://<ip adress or servername>/~<user>/.
By default the public_html directory will not be created within the user home directory's, so you have to create a directory called public_html in /etc/skel. The files in /etc/skel will automatically be copied into new user accounts by adduser. No other program should reference the files in /etc/skel. You have to create this directory by yourself for the allready existing users.
So when you create a new user after you have made the public_html directory in /etc/skel, every new user automaticly has the public_html directory within his home directory.

Quote:
Once the /apache-default/ file is deleted do I have to make any other changes in other directories in /var/www so that the users can have :www.example.com/~username/ load their page, and where do I put the index.html file to load the start page for www.example.com.
index.htm files for the users webspace (http://server/~user/): /home/<user>/public_html
index.htm files for the normal url (http://server/): /var/www

Last edited by muldereric; 08-02-2005 at 07:22 PM.
 
  


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
Apache default page dienerk Linux - General 4 10-22-2004 01:02 PM
Setting the default page in apache Browndog Linux - Software 1 06-17-2004 03:10 AM
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


All times are GMT -5. The time now is 06:43 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration