Wamp in LAN with a real domain name -


i have domain name , have set virtual host want know how connect domain name virtual host i'm new plz answer easy understandable answers

http-vhosts.conf

namevirtualhost *:80  <virtualhost *:80>      documentroot "c:/wamp/www"      servername localhost      serveralias localhost      <directory "c:/wamp/www">          order deny,allow          deny          allow localhost      </directory>  </virtualhost>   <virtualhost example.com>      documentroot "c:/wamp/www/example"      servername example.com      serveralias example.com      options indexes followsymlinks      <directory c:/wamp/www>          order deny,allow          allow      </directory>  </virtualhost> 

i want show website using domain name internal , external

ok lets assume domain called mysite.com , need testing version of site, lets mysite.dev

you have used apache 2.2 syntax assume using version of apache 2.2.x, however if using apache 2.4.x see below correct syntax

namevirtualhost *:80  <virtualhost *:80>      documentroot "c:/wamp/www"      servername localhost      <directory "c:/wamp/www">          allowoverride         order deny,allow          deny          allow localhost      </directory>  </virtualhost>   # accessing development version of site # note: accessible machine <virtualhost *:80>                        <-- change     documentroot "c:/wamp/www/mysite.test"      servername mysite.dev      <directory "c:/wamp/www/mysite.test">          options indexes followsymlinks     <-- moved         order deny,allow          deny          allow localhost 127.0.0.1 ::1     </directory>  </virtualhost>  #new virtual host real domain name #accessible internet <virtualhost *:80>     documentroot "c:/wamp/www/mysite.com"      servername mysite.com      serveralias www.mysite.com      <directory "c:/wamp/www/mysite.com">          options indexes followsymlinks          order allow,deny                           allow      </directory>  </virtualhost> 

if using apache 2.4.x syntax should chabged :-

#namevirtualhost *:80     <- not required in apache 2.4  <virtualhost *:80>      documentroot "c:/wamp/www"      servername localhost      <directory "c:/wamp/www">          allowoverride         require local     </directory>  </virtualhost>   # accessing development version of site # note: accessible machine , stored in different folder <virtualhost *:80>                        <-- change     documentroot "c:/wamp/www/mysite.test"      servername example.dev       <directory "c:/wamp/www/mysite.test">          options indexes followsymlinks     <-- moved         require local     </directory>  </virtualhost>  #new virtual host real domain name #accessible internet <virtualhost *:80>     documentroot "c:/wamp/www/mysite.com"      servername mysite.com      serveralias www.mysite.com      <directory "c:/wamp/www/mysite.com">          options indexes followsymlinks          require granted     </directory>  </virtualhost> 

you need add mysite.dev site windows hosts file c:\windows\system32\drivers\etc\hosts not live domain name

127.0.0.1  localhost 127.0.0.1  mysite.dev  ::1  localhost ::1  mysite.dev 

Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -