Linux/Apache Problem

  • katana
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 2391
  • Loc: Edinburgh, Scotland

Post 3+ Months Ago

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
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Daemonguy
  • Moderator
  • Web Master
  • User avatar
  • Posts: 2700
  • Loc: Somewhere outside the box in Sarasota, FL.

Post 3+ Months Ago

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.
  • katana
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 2391
  • Loc: Edinburgh, Scotland

Post 3+ Months Ago

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).
  • Daemonguy
  • Moderator
  • Web Master
  • User avatar
  • Posts: 2700
  • Loc: Somewhere outside the box in Sarasota, FL.

Post 3+ Months Ago

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>
  • katana
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 2391
  • Loc: Edinburgh, Scotland

Post 3+ Months Ago

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.
  • katana
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 2391
  • Loc: Edinburgh, Scotland

Post 3+ Months Ago

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:
  • Daemonguy
  • Moderator
  • Web Master
  • User avatar
  • Posts: 2700
  • Loc: Somewhere outside the box in Sarasota, FL.

Post 3+ Months Ago

Ahh perms. When in doubt....

Cheers.

Post Information

  • Total Posts in this topic: 7 posts
  • Users browsing this forum: No registered users and 71 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
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.