Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Beginer's Question

Status
Not open for further replies.

deratrius

Technical User
Feb 9, 2006
6
BE
Hey all I have a small problem and was wondering if someone could answer a few questions.

So I have httpd running, I made a new directory for my website in the var folder (lets say /var/mywebsite) and changed the DocumentRoot in httpd.conf to match the new path. I also added index.php in the DirectoryIndex.

But this doesnt seem to work and I still get the Fedora Core test page for my I think its loaded by default whenever there is an error or something.

I am thinking that maybe its because I didnt change rights for the new folder but I am not sure how to change them so it works properly.

Like the subject says I am a bit new to this and any help is welcome. Thanks in advance!
 
deratrius,

As feherke points out, you need to restart Apache after every change to httpd.conf. The occasional 'apachectl configtest' is probably a good idea as well.

Wishdiak
A+, Network+, Security+, MCSA: Security 2003
 
As a rule of thumb, you would set the permissions on directories to 755 and web pages to 644. Look in your error log to see what is going on. This is usually where you start when you have problems.

 
Well for a reason I couldnt access this forum from work so I wasnt able to answer till now. Yeah I restarted the service after each change and set the rights correctly (hell I even tried with FULL rights for everyone), I even got some guy to check and he didnt understand why it wouldnt work either.

So I did what I usually do when things dont work, delete everything and start over. Now it works..lol.. Anyway, thank you all for the answers! Seems like a pretty good forum :)



PS:

I guess removing/reinstalling is often a good compromise, I've had the similar problem a few days ago trying to get a website running (but on a windows server with IIS) so removed everything and started over..then it worked fine. I guess that for a real admin this sound very "newbieish" or messy but I was wondering, if this happens to you, what do you do? Spend hours on forums and reading mans trying to find out whats wrong or start over, more carefully?
 
Hi

deratrius said:
I was wondering, if this happens to you, what do you do?
Probably something like this :
[ul]
[li]check httpd.conf[/li]
[li]test httpd.conf with [tt]httpd -t[/tt][/li]
[li]eliminate .htaccess files[/li]
[li]check logs[/li]
[li]set log format to something more verbose[/li]
[li]send requests to [tt]httpd[/tt] from [tt]telnet[/tt][/li]
[li]Google[/li]
[li]minimize httpd.conf[/li]
[li]put deliberately wrong settings in httpd.conf and check [tt]httpd[/tt]'s reactions[/li]
[/ul]

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top