LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-07-2003, 05:10 AM   #1
hammerstein02
LQ Newbie
 
Registered: Dec 2002
Location: Leeds, UK
Distribution: Redhat 8.0
Posts: 15

Rep: Reputation: 0
Lightbulb Apache & PHP & RH8


I have recently been learning how to use PHP with Apache and MySql under Windows. Now I know that Apache etc is better suited to Linux and I have a RH8 partition so I figured why not use it to learn this on. I know that MySql, httpd services are started on my computer when I boot up, and httpd is running as I have checked.
I have placed index.html in my /var/www/html directory and I have gone into Mozzilla and typed http://localhost. But it doesn't work. I have looked through the documentation and stuff and can't find out how to do the basic set up.. if I haven't RTFM.. please give me a clue as to where I should look, otherwise can you point me in the direction of somewhere I might find this information.

My thanks for your assistance

Hammerstein
 
Old 02-07-2003, 05:19 AM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Quote:
it doesn't work.
Can you be more specific? There are many ways that something doesn't work and it will help to diagnose your problemif you give us the error messages.

I assume you have edited the relevant sections in httpd.conf?
 
Old 02-07-2003, 05:36 AM   #3
hammerstein02
LQ Newbie
 
Registered: Dec 2002
Location: Leeds, UK
Distribution: Redhat 8.0
Posts: 15

Original Poster
Rep: Reputation: 0
By it doesn't work, I mean I type in http://localhost it just sits there does nothing. I was at least expecting the Apache error screen or something. I haven't edited the httpd.conf file at all, I tried to use the httpd server visual configurator that comes with RH, but couldn't find information on how to use this properly. I presume I am missing something.. my apologies for my stupidity.
 
Old 02-07-2003, 05:46 AM   #4
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Yup. At a bare minimum you have to change the ServerName directive to "localhost". Don't use the menu configuration thing, it's a piece of crap. Open up httpd.conf in your favorite text editor and edit it by hand. I think in RH8 it is at /etc/httpd/conf/httpd.conf

Remember to restart apache afterwards (apachectl restart)

Look for a section like this, and make sure it says localhost:
Code:
# ServerName allows you to set a host name which is sent back to clients for
# your server if it's different than the one the program would get (i.e., use
# "www" instead of the host's real name).
#
# Note: You cannot just invent host names and hope they work. The name you
# define here must be a valid DNS name for your host. If you don't understand
# this, ask your network administrator.
# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address (e.g., http://123.45.67.89/)
# anyway, and this will make redirections work in a sensible way.
#
# 127.0.0.1 is the TCP/IP local loop-back address, often named localhost. Your
# machine always knows itself by this address. If you use Apache strictly for
# local testing and development, you may use 127.0.0.1 as the server name.
#
ServerName localhost

Last edited by bulliver; 02-07-2003 at 05:48 AM.
 
  


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
Slackware guide for AMP Apache MySQL & PHP xushi Slackware 35 05-11-2006 12:18 PM
ISS & ASP/.NET or Apache & PHP fuelinjection General 3 12-06-2005 08:41 AM
Apache & php & mod_dav Byenary Linux - Software 1 07-09-2005 02:26 PM
apache && php help needed issey Linux - Newbie 5 03-30-2005 12:28 PM
From RedHat9 to FreeBSD (Apache 2 & Mysql & PHP 4) guardian653 *BSD 5 12-11-2003 06:31 PM


All times are GMT -5. The time now is 12:33 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration