This is a discussion on Localhost and web root different access within the Windows Web Servers forums, part of the Web Server and Related Forums category; Hello. I have a problem with my apache server. I don't know to configure it, so that : - when I ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hello.
I have a problem with my apache server. I don't know to configure it, so that : - when I access apache from localhost (eg. "http:/localhost") woud point me to the default apache root (eg. "d:/apache/htdocs") BUT , - when I access apache via my IP ( eg. "http/:xxx.xxx.xxx.xxx" ) ,from the web , it would point me in a directory inside the apache root ( eg. "d:/apache/htdocs/www/html") http:/localhost -> "d:/apache/htdocs" http:/xxx.xxx.xxx.xxx -> "d:/apache/htdocs/www/html" |
|
|||
|
I've figure it out. For those who will may have the same problem , here is the solution: You must create a virtual host in httpd.conf I don't have Domain name and I run the server from my computer => ServerName = My ip adress In the 3rd section of httpd.conf you enter this code according to your data: ####################################### NameVirtualHost Your_ip_or_your_domain:80 <VirtualHost Your_ip_or_your_domain:80> ServerName Your_ip_or_your_domain DocumentRoot " The_exact_path_to_the_web_page_on_your_computer" </VirtualHost> ####################################### |