LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-23-2007, 12:49 PM   #1
master
Member
 
Registered: Oct 2003
Location: Birmingham/Eng/UK
Distribution: /Debian3.1/suse/Win7/8/10
Posts: 680

Rep: Reputation: 30
debian 4.0(apache 2.2)host my own website


Hi all,
I Have just installed debian 4.0, i have installed apache and when i do http://localhost/ it brings up the apache page which says "it works" so i figure i have apache installed correctly.So i found out that the "it works" was located at "/var/www/apache2-default" and i removed it and placed my own website files in there.So now when i type "http://localhost/" in to my browser i get an index of my website,which i have created which is not what i want.I wanted my webpage to come up.So i think my first question is have i put my website files in the right place?If so why does my site not display the way it should.I was running it on windows xp but decided to move it to linux.
Thanks Nige.
 
Old 04-23-2007, 01:09 PM   #2
gloomz
Member
 
Registered: Oct 2006
Posts: 137

Rep: Reputation: 15
Now when you say "website files"

Have you included a "index.html" in them?

Or perhaps a index.php?

Otherwise your mime types are possibly screwed up some how. Anyway, I don't recommend Apache.

The only reason it's popular, is because everyone else and his mother uses it.

http://hiawatha.leisink.org/

Try Hiawatha. It's written by someone in the Security industry. This webserver is incredibly easy, and way ahead of it's time.

Say goodbye to Apache, the big fat cow.
 
Old 04-23-2007, 02:35 PM   #3
djjoshuad
Member
 
Registered: Apr 2007
Location: Corinth, TX
Distribution: CentOS, RHEL, SLES, ubuntu
Posts: 44

Rep: Reputation: 15
with all due respect to the apache-hating poster above me, apache is popular for a lot more reasons than its own popularity... that's a self-perpetuating impossibility. Apache is also nothing close to a big fat cow unless you want it to be. Anyone who claims otherwise hasn't tried very hard to learn much about the product. I'm not trying to feed the troll here... I just want the OP (apparently a new user) to understand that there are other viewpoints. Choose whatever webserver you like best... but if you're just starting out with this stuff, it's far easier to find help with apache issues than any other.

Anyway, the issue is likely related to a lack of an index file. your webserver is expecting you to tell it what page to start out with. This has traditionally been an index file, one named something like "index.html" or "home.html". If you're using a php page, you will need to be sure apache is configured to use php. No matter what type of page you're trying to use, you'll need to make sure apache knows where it is. If you don't mind a little invasion of privacy, you could post a directory listing and your httpd.conf file here and we can help you troubleshoot.
 
Old 04-23-2007, 04:29 PM   #4
master
Member
 
Registered: Oct 2003
Location: Birmingham/Eng/UK
Distribution: /Debian3.1/suse/Win7/8/10
Posts: 680

Original Poster
Rep: Reputation: 30
Hi firstly thanks for the reply,
now just so there could be no mistakes i have just reinstalled apache which is up and running as in i get the "it works" when i type "http://localhost/" in a browser.When you ask for a directory listing i assume this is what you want to see.
Quote:
Quote:
About-me.htm
linux is here to stay.htm
AS-IF_files
linux_suggestions.htm
AS-IF.htm
localstart.asp
_borders
masternige_files
Carm.jpg
masternige.html
Connor.jpg
masternige_linuxworld.dwt
Copy (2) of Pictures
Messenger_files
Copy (2) of Python basics_files
Messenger.htm
Copy of Debian help.htm
mmc.gif
Copy of Debian help topics.htm
Molly-in the snow.jpg
Copy of Debian static ip.htm
Monitor power.htm
Copy of fphover.class
MY HTML HOW TO.htm
Copy of fphoverx.class
my_linux_help_topics.htm
Copy of html_tutorial.htm
my_nfs_tutorial.htm
Copy of images
nfs_setup_ubuntu.htm
Copy of linux_how_tos.htm
pagerror.gif
Copy of Linux how to(Suse).txt-ahpp.html
penguin.jpg
Copy of Linux how to(Suse).txt.bak
penguin_small.jpg
Copy of linux is here to stay.htm
photogallery
Copy of masternige_files
Photo gallery.htm
Copy of masternige.html
Pictures
Copy of masternige.pub
postinfo.html
Copy of Photo gallery.htm
Practice-homepage.pub
Copy of Python basics_files
print.gif
Copy of Python basics.htm
_private_copy(1)
Copy of Suse mouse config.htm
Python basics_files
Copy of Suse sources list.htm
Python basics.htm
Copy of testing.htm
Shortcut to my-page-old.....lnk
Copy of Ubuntu-help-topics.htm
sites-enabled
Copy of Ubuntu wireless card config.htm
Suse desktop config options.htm
Daims&Kaz 009_copy(1).jpg
Suse help topics_files
Daims&Kaz 177_copy(1).jpg
Suse help topics.htm
Daims&Kaz 272_copy(1).jpg
Suse Index.htm
Daims&Kaz 274_copy(1).jpg
Suse mouse config.htm
Debian help.htm
suseslick__questions.htm
Debian help topics.htm
Suse sources list.htm
Debian static ip.htm
Suse wireless.htm
_derived
testing.htm
desktop.ini
Thumbs.db
Download Linux.htm
Ubuntu-Desktop-Config.htm
FORMDATA.HTM
ubuntu_questions.htm
fphover.class
Ubuntu wireless card config.htm
fphoverx.class
_vti_cnf
help.gif
_vti_inf.html
html_tutorial.htm
_vti_log
iisstart.asp
_vti_pvt
images
_vti_script
index_files
_vti_txt
index.htm
warning.gif
libc_version.htm
Where to download Linux
_LinuxDiscussion
winxp.gif
linux_how_tos.htm
wireless_card_setup.htm
Linux how to(Suse).txt-ahpp.html
XP-Freeze_files
Linux how to(Suse).txt.bak
XP-Freeze.htm
now the file which should be my home page is "masternige.html" as for my "httpd.conf" it is empty.I hope this helps.

Last edited by master; 04-23-2007 at 05:08 PM.
 
Old 04-23-2007, 07:43 PM   #5
djjoshuad
Member
 
Registered: Apr 2007
Location: Corinth, TX
Distribution: CentOS, RHEL, SLES, ubuntu
Posts: 44

Rep: Reputation: 15
I don't think your httpd.conf is empty... it's probably just not where you think it is It should be in /etc/httpd/conf/ or possibly (rarely) in just /etc.

please post the output from the following and I'll see what I can figure out for you:

Code:
cat /etc/*-release
rpm -qa | grep http
 
Old 04-23-2007, 11:43 PM   #6
master
Member
 
Registered: Oct 2003
Location: Birmingham/Eng/UK
Distribution: /Debian3.1/suse/Win7/8/10
Posts: 680

Original Poster
Rep: Reputation: 30
Hi my "httpd.conf" file is in /etc/apache2/
 
Old 04-24-2007, 04:50 AM   #7
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Code:
cat /etc/*-release
see the title, debian 4.0

Code:
rpm -qa | grep http
see the title, debian uses apt


Also httpd.conf is empty and that's normal.


Quote:
now the file which should be my home page is "masternige.html"
And what happens if you type
http://localhost/masternige.html
?
 
Old 04-24-2007, 05:26 AM   #8
mastrboy
Member
 
Registered: Aug 2005
Distribution: Debian, OpenBSD, PFsense
Posts: 73

Rep: Reputation: 15
it's normal that httpd.conf is empty in debian, you use virtualhosts in debian pr default found in:
/etc/apache2/sites-available/

and you can easy disable/enable sites with a2ensite,a2dissite

pr default you have to remove a redirect in: /etc/apache2/sites-enabled/000-default

edit that file and find the redirect directive, and comment it out. then reload apache with: /etc/init.d/apache2 reload
 
Old 04-24-2007, 05:41 AM   #9
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Yes, this would be the cleanest

Apache is a big software because it's the most powerfull one. You can just do whatever you want with apache.
master, I suggest that you read a bit about its internal if you want to understand what you're doing.
 
Old 04-25-2007, 01:14 PM   #10
master
Member
 
Registered: Oct 2003
Location: Birmingham/Eng/UK
Distribution: /Debian3.1/suse/Win7/8/10
Posts: 680

Original Poster
Rep: Reputation: 30
Hi,
I would just like to say thanks for everybody's input.
After playing about when i type in http://localhost in to my browser i get my webpage come up which is great.Also when i use my other computer as i have 3 of them on a private lan all with there own ip address, and type in the computer ip address of my soon to be webserver i get the webpage up.But i only get that if i type in the private ip add not my ip i have been given by my isp.So at the moment it would seem i have created an intranet. which is almost what i want.So my question is how do i make this accessible to the outside world.I have opened port 80 on my router.Now i noticed just one error when i restart apache which i have listed below.

compaq:/etc/apache2# /etc/init.d/apache2 reload
Reloading web server config...3840
[Wed Apr 25 18:37:47 2007] [warn] NameVirtualHost *:0 has no VirtualHosts
.
If anyone can shed any light on this
Thanks Nige.
 
  


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
debian host as a mass storage device to another host? elfoozo Debian 4 03-05-2007 05:06 PM
host-to-host USB cable: how to make it work under debian?? stefan_578 Linux - Hardware 18 12-20-2006 02:09 PM
How to host website and e-mail from DSL? moosturdsoed25 Linux - Networking 4 06-05-2005 07:20 PM
How to host a website? Vodius Linux - Newbie 1 05-15-2005 04:39 PM
Free website host? Cyberian General 14 02-10-2005 12:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:02 AM.

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
Open Source Consulting | Domain Registration