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. |
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. |
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. |
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:
|
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 |
Hi my "httpd.conf" file is in /etc/apache2/
|
Code:
cat /etc/*-release Code:
rpm -qa | grep http Also httpd.conf is empty and that's normal. Quote:
http://localhost/masternige.html ? |
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 |
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. |
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. |
All times are GMT -5. The time now is 11:39 PM. |