Jump to content


Photo

virtual host error


  • Please log in to reply
3 replies to this topic

#1 shehroz

shehroz
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 09 August 2006 - 09:26 PM

i have added below code to httpd.conf, but i could not restart the server. it says error.


NameVirtualHost 111.22.33.44

    <VirtualHost 111.22.33.44>
    ServerName www.domain.tld
    ServerPath /domain
    DocumentRoot /web/domain
    </VirtualHost>

what is my error in this code?

#2 oldmanice

oldmanice
  • Members
  • PipPipPip
  • Advanced Member
  • 134 posts
  • LocationIn Your Garden At Night

Posted 10 August 2006 - 03:12 PM

You havent got a proper document root you cant have your document root your domian name you need to place your server files like your Mp3 , Txt and etc files as your document root
Join my Froums www.phpbbplanet.com/darkwinter

#3 youcantoo

youcantoo
  • Members
  • PipPip
  • Member
  • 19 posts

Posted 11 August 2006 - 10:34 PM

[quote]
[quote]
i have added below code to httpd.conf, but i could not restart the server. it says error.

NameVirtualHost 111.22.33.44

    <VirtualHost 111.22.33.44>
    ServerName www.domain.tld
    ServerPath /domain
    DocumentRoot /web/domain
    </VirtualHost>

what is my error in this code?
[/quote]

It should look something like

NamedVirtualHost your IP address

<VirtualHost xxX.xxx.xxx.xxx>
  ServerName domain.tld
  ServerAlias www.domain.tld
  ServerAdmin you@youremail.address
  DocumentRoot /path/to/your/web/files
    <Directory /path/to/your/web/files>
        Order Allow,deny
    </Directory>
  </VirtualHost>


Do not forget that the server will have to be restarted after making any changes to the httpd.conf file

#4 oldmanice

oldmanice
  • Members
  • PipPipPip
  • Advanced Member
  • 134 posts
  • LocationIn Your Garden At Night

Posted 04 September 2006 - 09:59 PM

Just change it to


VirtualHost xxX.xxx.xxx.xxx>
   ServerName domain.tld
   ServerAlias www.domain.tld
   ServerAdmin you@youremail.address
   DocumentRoot /path/to/your/web/files
     <Directory /path/to/your/web/files>
        Order Allow,deny
     </Directory>
  </VirtualHost>

BTW the xxx arent kisses thats your local ip address
Join my Froums www.phpbbplanet.com/darkwinter




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users