Page 1 of 1

httpd.conf - Edit to get see your page.

PostPosted: 30. January 2013 18:15
by rubengalvan
Ok here is the problem, well i dealing with this stuff trying to make my page up in my local server but i heard that you need to configure or edit the httpd.conf to get that, as you know i read a lot about that and just realize that i need to put a instance about virtualhost, if that´s the solution, someone can give me an example, i´ll appreciate :D .

Since now thanks!

Re: httpd.conf - Edit to get see your page.

PostPosted: 30. January 2013 18:28
by Altrea
Hi rubengalvan,

A short salutation is an act of politeness. Even if the internet is an virtual area, there is always a human being behind the screen. A polite beginning helps to get polite answers too. Please keep that in mind if you start a new thread. Thank you.

rubengalvan wrote:i dealing with this stuff trying to make my page up in my local server but i heard that you need to configure or edit the httpd.conf to get that

No.
Basic example:
Assuming you have a test.php file with this contents
Code: Select all
<?php
echo "this is just a test!";
?>

Save it in a directory inside your htdocs folder, for example \xampp\htdocs\myfirstproject\test.php.
After that you request that page with the relating valid url http://localhost/myfirstproject/test.php et voila, it is visible without editing anything in Apache or Windows.

rubengalvan wrote:i read a lot about that and just realize that i need to put a instance about virtualhost

You just need virtualhosts if you want to simulate multiple webserver instances with just one Apache. With vhosts each instance can have their own ip/port/domain.

best wishes,
Altrea

Re: httpd.conf - Edit to get see your page.

PostPosted: 30. January 2013 18:43
by rubengalvan
My apologize Altrea, you´re right, so ok, the next time i´ll polite for a polite answers.


ok, about the vhosts, if i put this instance i can configure the domine and por that i want.

Re: httpd.conf - Edit to get see your page.

PostPosted: 30. January 2013 18:49
by Altrea
rubengalvan wrote:i can configure the domine and por that i want.

vhosts are just for separating.

Example: You can use the Windows\system32\drivers\etc\HOSTS file to do a name resolution for test.dev to ip 127.0.0.1.
With a vhost entry for the domain test.dev you can configure, that just only this domain has a different document root directory than the other.