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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing DocumentRoot results in locate error

Status
Not open for further replies.

Mark1979

Programmer
Apr 10, 2006
4
NL
Hi,

I've changed my DocumentRoot in the httpd conf file. Now I did this awlso whith the line:

<Directory "C:/Apache2/htdocs">

So both are changed. I awlso tried with just changing the DocumentRoot value.

After I change the directory I reset Apache. Then start. Then when I try to acces http:/127.0.0.1 its gives no result.

So I change it back, but now the original line does not work anymore too.

I made a backup of my httpd conf file and put it back in place. So there were ectually no changes made now. Just the copieing of a file. But still it doesn't work.

How can this be and how do I solve it.

Thanks,

Mark
 
Your URL was wrong, should be

If that was a typo, make sure that when apache is running that it is listening to port 80, use "netstat -an" to see that port 80 is listening.

gene
 
It was a typo. And I have changed it to port 81. And befor changing the DocumentDir everything was working.
 
It works thanks. But I still do not understand that after i changed it to 81 it wordks. And After I changed the documentroot it didn't. But it could have something to do with time. But perhaps you know. Couse to me it does not make sence for now. They way you put it it logic by the way.

Thanks again
 
You need to stop/start or reload the apache server everytime you change the config. Sorry, I am a Solaris guy, but I am sure it is simple.

Also, you can check if something is listening to your ports using "netstat -an" (which works both in command prompt for windows and solaris).

So if you are configured for 81, take a look at the netstat -an output and you should see 0.0.0.0:81
tcp listen entry.

gene
 
yes I understand and I will take a look at the netstat command now.

Thanks to you all.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top