Bluehost.com Web Hosting $6.95

Localhost and web root different access

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 ...


Go Back   Usenet Forums > Web Server and Related Forums > Windows Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-02-2006
pop.cosmin@gmail.com
 
Posts: n/a
Default Localhost and web root different access

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"

  #2 (permalink)  
Old 12-02-2006
pop.cosmin@gmail.com
 
Posts: n/a
Default Re: Localhost and web root different access


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>
#######################################

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 12:46 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0