LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Default Apache 2 Page (https://www.linuxquestions.org/questions/linux-newbie-8/default-apache-2-page-347902/)

linutzy 07-29-2005 12:20 AM

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.

cdhgee 07-29-2005 03:47 AM

Just overwrite the index.html file in the Apache document root directory - usually /var/www/html when you install Apache 2.

linutzy 07-29-2005 03:57 AM

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

cdhgee 07-29-2005 04:34 AM

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.

muldereric 07-29-2005 03:10 PM

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

cdhgee 07-29-2005 04:20 PM

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

linutzy 08-02-2005 01:05 PM

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.

muldereric 08-02-2005 07:18 PM

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


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