Linux/Apache Problem

  • katana
  • Mastermind
  • Mastermind
  • User avatar
  • Joined: Sep 07, 2004
  • Posts: 2390
  • Loc: Edinburgh, Scotland
  • Status: Offline

Post December 15th, 2004, 8:16 am

Okay, this is my first attempt at setting up Apache on a Linux box, and I'm lost :D
I've got Apache installed, and I've typed in http://localhost to make sure it's working, and it is. The problem that I'm having is getting my own content to be displayed. I'm using Fedora Core 3, so everytime I go to localhost I get the Fedore/Apache test screen, even though I've uploaded content to the '/var/www/html' folder. I've also edited the 'welcome.conf' file in the apache folder 'conf.d' so as to disable the Fedora/Apache test screen, but it still keeps appearing.
More importantly, (as I mentioned before) I've uploaded content to the directory that it expects to find the html pages in, however when I try and access these using 'http://localhost/index.htm' etc, it gives me a 403 Forbidden error.

Forgive me if this is really simple / obvious, it's been a long day and my brain is fried :D
Why do geeks get Halloween and Christmas confused?
Because 31 Oct == 25 Dec
www.darren-king.co.uk
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post December 15th, 2004, 8:16 am

  • Daemonguy
  • Moderator
  • Web Master
  • User avatar
  • Joined: Jan 23, 2004
  • Posts: 2673
  • Loc: Somewhere outside the box in Sarasota, FL.
  • Status: Offline

Post December 15th, 2004, 10:15 am

Look in the httpd.conf file; where you see the path to the default content, is where you need to chnage it to point to where your content is.

DocumentRoot is the key.

Then restart Apache.

Also, ensure that (in httpd.conf) that index.htm is one of the indexes.
(Note: the .htm extension; it could be set up as .html extension only as well).

Cheers.
"It's always a long day, 86,400 won't fit into a short."
  • katana
  • Mastermind
  • Mastermind
  • User avatar
  • Joined: Sep 07, 2004
  • Posts: 2390
  • Loc: Edinburgh, Scotland
  • Status: Offline

Post December 15th, 2004, 1:46 pm

Thanks Daemonguy,

Thing is, I've checked the DocumentRoot and the extension values. I've got Apache running on my Windows machine, and change the DocRoot regularly for testing websites. I've also played about with the extension field when I installed PHP (on my Windows machine).
Why do geeks get Halloween and Christmas confused?
Because 31 Oct == 25 Dec
www.darren-king.co.uk
  • Daemonguy
  • Moderator
  • Web Master
  • User avatar
  • Joined: Jan 23, 2004
  • Posts: 2673
  • Loc: Somewhere outside the box in Sarasota, FL.
  • Status: Offline

Post December 15th, 2004, 11:23 pm

It pays to look at the easy stuff first. :)

once you changed the docroot and/or the extensions, you did restart the server right? I know, I know....

Thing is, if you start it, and it's working it should always show what is in docroot, provided there's a matching <index>.<extension>
"It's always a long day, 86,400 won't fit into a short."
  • katana
  • Mastermind
  • Mastermind
  • User avatar
  • Joined: Sep 07, 2004
  • Posts: 2390
  • Loc: Edinburgh, Scotland
  • Status: Offline

Post December 16th, 2004, 3:28 am

The thing is, the pages are there as it's giving me a 403 permissions error, not a 404 file not found error. If I type in the address of a file I know isn't there ("blah.htm") for instance, it gives me the 404.
Why do geeks get Halloween and Christmas confused?
Because 31 Oct == 25 Dec
www.darren-king.co.uk
  • katana
  • Mastermind
  • Mastermind
  • User avatar
  • Joined: Sep 07, 2004
  • Posts: 2390
  • Loc: Edinburgh, Scotland
  • Status: Offline

Post December 16th, 2004, 6:18 am

Don't worry, got it sorted. I was all over the internet looking for solutions, and I had changed permissions/disabled SELinux etc when all along I hadn't set the permissions correctly for the individual files in the /var/www/html/ directory. Silly me :oops:
Why do geeks get Halloween and Christmas confused?
Because 31 Oct == 25 Dec
www.darren-king.co.uk
  • Daemonguy
  • Moderator
  • Web Master
  • User avatar
  • Joined: Jan 23, 2004
  • Posts: 2673
  • Loc: Somewhere outside the box in Sarasota, FL.
  • Status: Offline

Post December 16th, 2004, 1:35 pm

Ahh perms. When in doubt....

Cheers.
"It's always a long day, 86,400 won't fit into a short."

Post Information

  • Total Posts in this topic: 7 posts
  • Users browsing this forum: No registered users and 65 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.