Vous êtes sur la page 1sur 9
zana2016 Virendra's TechTalk “roan [a] | cone “Dm Creating multiple virtual hosts/websites in Wampserver By Venda Chandek on June 25, 201 {Goo comments (45) Leave a comment ‘To create mutipe websites, would be heb to have ‘lampsorver (rust Apschs) we can easily configure mutile webses. Following ae the stps to Ths wses Apache's ‘Named Vitual Hosts" ravon, Lhave tested these stops on Wampserver 2.1 runing on Windows XP and Windows 7. ch wads setvp on local computor. With conte multe websites using Apache's configura. Step 1: Set your hostnames or setup Windows to recognize your local websites [Aor instaling WAMP server you can 9 othe browser and type hiplcahost ans opens up a age Windows by default racognzee te at locabot a8 caring to sl We need o setup windows \Weows Kay + and then typo “arvers™ and press "OX" then got st) C-smindows/systems2/arivers/ete [Aer gong to this decry opan he fle named hosts inthis drtory sing you avo te (tke Notepad, Edtots, Notepads) Note: You nay net beable a eli or save this le Windows Vita or Windows 7. You need administra oo this We Now, you woul se ane athe ond of th ie fotos: 7.8.0.1 localhost This code tls your computer o annect to your oan computer when wey 10 go hp: Inthe hosts fle, The updated fle wouks look start the fllng A localhost Br e.e.1 ‘This woul eke you tothe same page as nipllossihos Now out computer inows what Mp! i Nota: Make sure you do not edd host entre for external ses tke google.com or Ding.cm. you add ‘hoce antes, then the computer would no longer be abl fo 90 to te actual wobsies, Step 2: Create a folder for the website \ampserverhas ony one flder ost root to hos the website, This elder is pial €: aan Wo shoul reat a deren folder foreach wobsite We can crate th folorin any decor or drive (te eat he flder outside of c:/nanp/es we Would need some adational Settings In A descr ater ‘Add sore etn th folder ke “index oy cage stractry, Step 3: Setup Apache to serve multiple sites We woul change rats. conf forthe Apache seting (open he fle httpd.cané By elekng tha WAMP sarver eon and electing “Apache > hpa.oo This ‘eis sypcally locatoa at C:/ang/atn/spche/tpached.2.27/cat Doni add coset this fe, isnot a cloan and wasy way. Wo just want fo un-commont one fne in his fe that include the vnosts fe itp: vrendrachandak comitechtalkfrsatng-muliple-virtual-webstes-n-wampserver! Creating mulipe virtual hosts websites in Wampsarver - Virenra's TechTalk J’en profite ! Follow Virendra's TechTalk via Email (Get every new post delnere to your Inbox Related Posts directives How to generate passwords for passwd Catogori css (0) Funconaty (4) GlossaryDettion (2) savaserst (2) Juery (2) nuysat (6) Optimization hos (3) Phe cia) Secsriy (4) S04) Server Comiguation (12) Tool (2) Web Development (25) 1 zana2016 Creating muliple virtual hosts websites in Wampsarver - Virena's TechTalk ‘aIncluae con /extra/nttpd- vhost. ont Remove he # sign rom the font feline, he changed fe shoud lok a follows Include conf/extra/netad-vhosts.cont Now, wa wl open the fle “hitecnost cont whin woul! be typically located nai Inthe we wilada val host sing he following cade evirquaThost 7005 Serveridein sgniaplocathost ‘ecunentsoot "c:/wanp in Serveralsgs wny, localhost. con Errortog “logs/iocalhost error. log” Citontog “sogs/localnost=aecess. lo erviruntnost Inthe above ode th SorverName and DocumentRoot are mandatory, stor option as optional. So we want 9 have 3 stes on our loeal machine as flows sie2 > Cie Serveridein soninélocalhost Beeunantont "cap aa Servernane, locainost Serverkisas wut localhost con Errartog “loga/iacalhost error. og” ‘Gostontog “Logs/localhest=secess. log comon Buus erireasines® -vingvallost 1809 brenda Socuenttot "carga sit Vv Viondra'sTochtak ersreusiion “vingvalhost 1809 DocumentRoot "c:/site2” ie Servernsne: sizez Girectory *C:ysite2"> Options Indexes FollowSyaLinks Multiviews othe ator yourinds oe is Mlovoverrise hone Order stow, deny lou fron all yosrectory>| ervurtalhost ‘nave nat used athe options for set and ae, butts @ good practi te have them. Algo notlon Virencrais TechTalk thatthe code for ste2 has some extra code or Dtctry This is necessary to gv te sever accuse o> tm ||| fo that ectry we don ad this, the server il at be able to acces he fs inthis directory and Which the decry setting are set by det in wampsever Now restart Apache and allyoUr ses shouldbe workng. Make sure you ade 2 to your hos fhe Note: do not eke responsi for proper uneining a the above mentone steps under a |am net respensibefr any damages to your compute, wobsto, blog, apleaton or any ting ose | no vo 9 © [kun Rolated Posts How t hide apache infomation wth SorvorTokent and SarverSignalure deectvs 2. maces pe 4. How to gonorae passwords for hipassud using PHP 1 Sorver Configuration, Web Dovelopment {© Apacre, sppes, val sos, WAMP, wampserver ‘= optimizing Speacing up webstes Tools for Web Development + itp: vrendrachandak comitechtalkfrsatng-muliple-virtual-webstes-n-wampserver! zana2016 Creating mulipe virtual hosts websites in Wampsarver - Virenra's TechTalk Lave s comment? s5.cameant 41 PMPST Donna February 18,2012) - He veondra Wonderful and help ost, tank you. In your example, can sie? be on a iron cal sk ke ietez? ep stot > ewampwansiot ServerAdminadinglocaost DecumentReot“Cwampiw™ ServerName fcalost erveras hp wm localhos.com Eroriog Tbgslbcahost-orerlog" CcustomLog“egslocanost-eccess og" common DocumentRoot “Cswamtinwlster” (pts Indexes FotowSymLinks Mutvews ‘AeaOvorde None Ona deny Yona February 20,2012 at 825 AM PST Reply Hiden, ‘Yes, slo? can be on siferent disk nt long as tis accssible by apache server, (De Moose Ociober 9, 2019 al 42 AM PST Reply ude, you ned o fx your code. hae those Sg and &i-2 al over the place Vrendrs October 9, 2018 at 4:58 PM PST Reply ‘Thanks for noing | eet. Sorty about hat. Iwas caused recent de fo some Donna February 20,2012 at 237 PM PST Rely Thank you for you reply Veendra, bul what do you mean by as long asthe dss accessible by apache server? | assumed confgurng CxmampbinapacheApacte2.2.1Teon and Mpc vost cot as por your instructions would ve apache accass alread? Wha todo then a make Apache accassie to my D sive? Thank you fr your help ee would [nave ‘Wonara February 20,2012 at 650 PM PST Reply Yes itshould be accesso by apache. Ifthe sis on dfernt ives on same machine than you should not have any prabie, dna Fabraty 28, 2012 a 8:34 AM PS ey ‘Wout this bo possible if the devo was ona diferent machine. Method? donna Febuary 28, 2012 a 245 AM PST man 1 lossy yosts sup on here and on othr sts ang atamted several tes, but keep language an reacing guidance notes on Apache sis just making me go blind. ash instaled \wamp wh no changes to configs with view to staring from seat, have a business web in te wob us fr each ste doraect he nature ofeach one (hpsbusinesssto sorebog.net itp: vrendrachandak comitechtalkfrsatng-muliple-virtual-webstes-n-wampserver! zana2016 Creating mulipe virtual hosts websites in Wampsarver - Virenra's TechTalk and Personae hopto ne) but obviously they bth come hough one reuter and one port 80 to My problem isha the baste setup of WAMP wit my Business webs n foc folder ana Personal webste in subolser means alimage fle inthe business and persona okers ‘show up nthe google search. | assume tis i because the ses are served from the same separato machines orp aédrossos? Thisis tho ony way Ican tink oft Koop business os and personal les separately fom showng up in google mages when entering ul fom one ste ‘ny advice woud be most appreciated sion Mis October 13,2012 at 10:8 AM PST Reply ‘This was @ grat tle tutorial tank you Howover I must note that Iam unable to see the requed VituaHost and Drectry tags Iwas utesslyattompting to aad the example code without the Decor tags all before found anther resource on the web using the age hipstorum.wampsorvercomireadonp?2.5338, ‘renara Otaber 19,2012 at 5:00 PM PS Reply ‘Thanks fr pointing Pa ot. | have updeted the code to ads the Vtuslost and Oeeetary Tags. gas November 25, 2012 a 12:39 PM PST He Weendra Is tsafoto use this 26a webserver in a producon environment? * Reply ok, guess got.) Inpseecuriymeccacomiattlansa-and-socure-s-namp-webeerer! sm Febru a s am CoratArtet..Worka efor me Marco Mareh 9, 2013 4106 PM PST ely can connect thom, How woul I go about tis? use Wamp. na Jy, 2013 a fa How can | get WAM VIRTUAL HOSTS, Webstes in MULTIPLE PARTITIONS & NOP werksg? leant gat this 0 work FRESH INSTALL OF LATEST WAMP VERSION 24 WINDOWS 7 HOME PREMIUM | wantto know how to serve sovaral wabstos wh each ons ona siferant pariton of he argv and fr tham to be accesso tothe publi using nop host ect service! nave looked at so many gules, vido tlre, creatod Aases,viual host, configured Options Indexes FolowSymLinks arecives andl atilcant getthe “tng to wor! ‘ThoreIs no sop by stop guld and so mary people have difaront requirements an so many poople fer diferent solutions. And so many people work or and so many people doosat! | am ost in oot of so much nfrmation wt very ile 1 go ann nat ace but not @ owe at roading or tying to understand ele. cand some ut cannot so0m to fd whore im ging wrong, I dant want to be fered to mere long winded wabatas,qudes or manuals | multiple sto tat canbe views by tho publ or show me where Im going wrong in this. Can itp: vrendrachandak comitechtalkfrsatng-muliple-virtual-webstes-n-wampserver! zana2016 Creating mulipe virtual hosts websites in Wampsarver - Virenra's TechTalk anyone who news wha! odo, speak inetigby but smgly ar show me wherein going = Does Document root mean, path AND fbr of websie pages? = Does Servorame mean Name of PHYSICAL Computer wth webs wih the web pages ae in? = hisjust Mi? a in jut he parion litle assigns or do | ate folder name a wel. and hit (tins Indexes FotowsyLinks Muivows ‘AomOvetde None (order ato deny ‘ow rom ail oes # atow he public to soe my webstes? D968 go ia Mpcanl ar vhosLean!? ‘THIS MY SETUP No Aliases created Wamp lat stays on orange This is my ethos fle 127.00.1 eahost ‘ecanost 127.0.0.1 ste idontnocom 127:0.0.1 ste8.whatnaneindoing.com Include confexraitpd-vhosts.contuncommentos This is my hte vhosts he # Amos any Aoacne deci may go into a ViualHost container. 10 ToefatVituaost section used foal request that do not # maton a ServerName or Serversasin any bloc. ServerAdminadminglocahos ServerName leahost ServerName ste idoniow.com (Options Indexes FolomSymLinks Muliviows ‘AlmOverde None Corder aon deny ‘ow rom ail ServerName stoB.whathshelimding com Cptins Indexes FotomsyLinks Mlivows ‘omOverde None itp: vrendrachandak comitechtalkfrsatng-muliple-virtual-webstes-n-wampserver! In torthe folder name zana2016 Creating mulipe virtual hosts websites in Wampsarver - Virenra's TechTalk onde tow deny ServerName steC hope'sagoosthing com Cte Indexes FolomSymLinks Mulivews ‘avenge None Conte alow deny uur "No Wamp page, no loal host. Ccutonty,r-intaloa WANE, back lo square one fresh slat anyone can help guide me through. WAMP Green, Locahos! page running! hash umar Dacerber 9, 2074 at 1:06 PN PST Reb, [Above Example artes 100% Easy and Very Very Good Please check properly once team vewer no hidden-coets, (shasnnxesa@ymat con) ran duly 13,2013 at 7:54 PM PST Reply nals great hap. very good and gh uo confi tual host in wap 2.¢ DDhanushke Octoper 22,2019 at 2:39 AM PST man Great example was relly use forme, Tine Botngo Ong Sanuny 7, 2034 at 2:16 PM PST om Rely Thank you fora grest rl, The reasons for dong each stop was dearly explained, (Omar January 10, 2014 at 3:39 AM PST ely hota, Lam having problems connecting my new project fo phpmyadmin Now project is ated under te wafer, hen | preview the pp a in ny browser only shows the php code but not the design webpage. 18 Bhp serie are nt exscutng, are working oe. ‘You prbably have php execution a and also the apace cont, old that foller. would check any htaccess fle ‘Omar Janvaty 1, 2096 a1 798 AM PST Rey ‘Thanks forthe reply Vena, lst to make 6-9, in her words! should enable php execution vi themiacass le fan apache config? [have one more question, does his havo todo wth sting up mutipe vital hoes, ‘td otis new proj unction wth php and phpmyadmin? ‘Thanks agen itp: vrendrachandak comitechtalkfrsatng-muliple-virtual-webstes-n-wampserver! zana2016 Creating mulipe virtual hosts websites in Wampsarver - Virenra's TechTalk Viren January 11,2044 at 4:38 PM PST Reply | meantto say, that you might have & sabed va.Macoess or apache conti. By {ela tbe PHP execton shouldbe enabled, So check you confi ls and acess tes to make sure you have not disabled accidentally cannot ll you fray what needs lo be changed witnoul seeing your setup. 1k, I gett. Thanks forthe hal, Much appreciate it ‘ " Fooly My stots actg ike a second localhost, ss ringing me tothe A root sar sarar Saptari a 8 Reply nave insted wampservr, an inthe oot decry have made a website. now want 6 pull nine hal thor etre can acces through inlrnal, andar using Apache Version 24.9 and wncows 8 please anyone help me hat how can ido tap by etop ‘g0ccomaco October 17,2014 at 9:37 PM PST Reply ‘Thanx ® you are ate saver @ test Ober 30,2014 at 6:23 PM PST en “Tanks! ad many tts But yours isthe bost Wl explained (y) ‘Shas Novembar 1, 2014 a 12:26 AM PST =n “ [have a websto at clwampiwanstot in Computer A | would tke fo open this ie fom Computer 6. Both Aan ae in LAN (Wand Ethernet) How odo that, 1am newin Webste velopment. Ihave folbwed your tutorial but was notable fo | musing windows 7 32 be and win 164 it wth WAMP stack Realy how do browse the ste hosted with WAM wihout puting the a ke 123.456.5120. com | want tke it: st com [Rwerkad on my lapop but when ited fom anather mercine, | gol DNS nat found error hash kumar December 8, 2014 at 11:09 PM PST Reply (One Thing you ean do. it posse u connect another machine with your lol network thon access your localhost hen check your projects accessible Noe: any mistake in Enalsh extremely srry (not good my English) hash sumar December 2, 2014 at 10:58 PM PST Reply “Thankyou for above shared wal ios croato mn windows December 28,2014 at 1000 AM PST ely "Thanks for your post, You have done a very good exelent, itp: vrendrachandak comitechtalkfrsatng-muliple-virtual-webstes-n-wampserver! 78 zana2016 Creating mulipe virtual hosts websites in Wampsarver - Virenra's TechTalk tsonFobrvary 21, 2015 at 1:25 PM PST Rey 1ne5) ry opening the fle in a ferent program Ike Notopad =* (re) stumped me fr about an hour! Iwas making the change and because twas all scunched up itjust massac to flo up exec February 25, 2015 12:39 PM PST Reply uk March 6, 2018 at 3:39 Pt PST Reply ‘This seomed to work correct but you realy noes to adel insusion for people newt this kind of thing, Do Incest load the WorePres fle note elder bul for st? follwing your Insructon? eiste2. not how do | get aWP ste o use Wamp tom ste2? Thanks ‘roger March 19,2015 at 842 AM PST Reply ‘nce doing his rm unable to access phpmyadmin ana my squeal, say nat found Jpapmyaimin srt found on this server ans they wers working betes thers away ican got ove August 25, 2015 at 12:95 AM PST ey ‘Thankyou. I you plan on doing tutorial on how to arable Pagination than let me know a5, star tn days research am no all unsure ato whch les go where. atinow September 21,2015 a 10:34 PM PST Reply administrator. THEN. fle>open and goto your drivers fee. You wll need change tho soting trom tat tales to $08 “nose. Tha show you cack the seemingly uncrachable wndows hosts fl, you ty o get admin ight recy over th le sae nat kay going to happen ‘So opening he edo a the admin isthe workaround took me a month to discover tis so ‘credit goes to hs guy: how cespace.confenonledg hostefle entvarelimedy-yure “Tested and working on Win8. on 9122/6 ~ Ako hsnictons for vita users a wel Matin Soptembor 22,2018 at 108 AM PST Reply Untorunataly, bayand cracking the note. | was completely unsuccessful set resales to ‘So basicaly can acess localhost now under 3 names, DID um all amp serves of using, and ton back on, ue to apache's tendency to unrecoverable crash. Taking apaches beyond rueros faults as noted and agreed i illdaesn'thelp me. My abecve in going he wae ‘at hopetly | would never have to ouch apache again as rm sk n eed of reinsaling wap over and over further attomotsconduded 3am CST 9122/5 hipsstackovertow comiquestons/26113258hvamp-vrtuabhost-no-working “This doe not reat the asue, Yes stopp and restarted 1 ‘This s NOT A WINDOWS ISSUE...a5 usa tis an apache one, Unfortunately, here are so 000 many “apacne suas" I don even know where to begin tooo, Gating tred..wont be itp: vrendrachandak comitechtalkfrsatng-muliple-virtual-webstes-n-wampserver! zana2016 Creating mulipe virtual hosts websites in Wampsarver - Virenra's TechTalk Ccutenty the folowing setup 0 NOT work Soliton: Pending ~ Posse reinstall neades Womp2.s Fetox 4027 tp of my haa..are we up that high now? WOH ‘St appreciate the tutor. he ues! ve gatos in 14 mente playing with warp. Looks te m gonna be up alright th. find he tori on how to ONCE AGAIN fk apache's (blaep)ups and piss pour design. be sure to post tho Ink. tno Seplember 22,2015 91:31 AM PST Rey Justlost my databases. yeah. awesome! Orange light of dath.god bles the fonch for at as pling a pleasant clot tel you youre Serawed, hahansha | wonder cl erosot? m sure they get blamed for apache's matunconsae lhe time! caren tatu, .Wn8.1 & Werp26...etua hosts ha otto worktathis day! PERIOD! Suresh February 22,2016 at 10:00 AM PST Reply Really vary nice ans very useful for me. Thank you Hell March 4 2016 at 208 AM PST Reply He weonda | created 8 ean now tying o iain multe, Ihave a Wampserver 2. installed on Win Vista, tied and doesn work. Do you have any tps? Sokfawin March 22,2016 at 791 AM PST Reply Great sharing, do you have a same of working one? Imlcnas March 23,2016 a 805 AM PST mn "Noto:to make thie work for he waoste on cist? [nad toad ine "Require lca” neise the enty Fiewon May 31,2018 2237 PM PST en lee working 100% & fo usa cooks sa contnt and acs, t provide sci mela features ana to anaes our rat, By cominung to ues this ta, you agree that we Ube 0 Trackbacks and Pingbacks: + Enabing WebDAY On Fedora "6 | EssayBoard-Plnghack on 2011/9128 21:14 Copyright © 2016 Vondra's TechiTak| Powered by WordPress | Dsdammer| Privacy To. itp: vrendrachandak comitechtalkfrsatng-muliple-virtual-webstes-n-wampserver!

Vous aimerez peut-être aussi