*jancis38* Posted April 4, 2007 Report Share Posted April 4, 2007 Ja manas mājaslapas adresi ieraksta interneta pārlūka browseri: http://ibm.sytes.net un ierakstot šo web adresi, viņš automātiski aiznes uzwww mapīti, kurā ir visi *.php faili, vai nav iespējams izdarīt tā: Ja interneta pārlūka ieraksta: http://fire.sytes.net, bet tas ir tas pats kas http://ibm.sytes.net, 2 domeini uz vienas un tās pašas IP, bet ierakstot: http://fire.sytes.net viņs neaiznes uz www mapīti, bet aiznes uz citu (piem.: www/lūzeri/haija/index.php) Tipa tā, ka uz vienas un tās pašas kastes ir 2 webi! Lūdzu atbildiet... Paldies jau iepriekš! Link to comment Share on other sites More sharing options...
hackerman Posted April 4, 2007 Report Share Posted April 4, 2007 Vari palasīt http://janhouse.id.lv/?sadala=raksts&id=29&v=8 Link to comment Share on other sites More sharing options...
andrisp Posted April 4, 2007 Report Share Posted April 4, 2007 Apache virtual hosts google for it! Link to comment Share on other sites More sharing options...
cucumber Posted April 4, 2007 Report Share Posted April 4, 2007 Apache virtual host jaskatas Link to comment Share on other sites More sharing options...
martins256 Posted April 4, 2007 Report Share Posted April 4, 2007 (edited) Varbūt ar $_SERVER[sERVER_NAME] vai $_SERVER[HTTP_HOST] var noteikt pieprasīto domēnu un tad attiecīgi header("location") ? pamēģini ielikt index.php šādu kodu: if($_SERVER[SERVER_NAME] == 'ibm.sytes.net ') header("location: "www/"); if($_SERVER[SERVER_NAME] == 'fire.sytes.net') header("location: "www2/"); varbūt, ka SERVER_NAME vajag nomainīt ar HTTP_HOST Edited April 4, 2007 by martins256 Link to comment Share on other sites More sharing options...
*jancis38* Posted April 4, 2007 Author Report Share Posted April 4, 2007 (edited) Es itkā izdariju visu pareizi, sākumā editēju httpd.conf # Virtual hosts #Include conf/extra/httpd-vhosts.conf apmainiju uz: # Virtual hosts Include conf/extra/httpd-vhosts.conf httpd-vhosts.conf man iskatās šādi: <VirtualHost *:80> DocumentRoot "C:/Web/www/" ServerName ibm.sytes.net ServerAlias ibm.sytes.net </VirtualHost> <VirtualHost *:80> DocumentRoot "C:/Web/www/hostings/fire/" ServerName fire-tm.sytes.net ServerAlias fire-tm.sytes.net </VirtualHost> es itkā izdarīju visu pareizi, bet ieejot http://fire-tm.sytes.net viņs man atver to pašu http://ibm.sytes.net kapēc tā? Edited April 4, 2007 by *jancis38* Link to comment Share on other sites More sharing options...
Val Posted April 4, 2007 Report Share Posted April 4, 2007 restartē apache. Link to comment Share on other sites More sharing options...
*jancis38* Posted April 4, 2007 Author Report Share Posted April 4, 2007 restartēju. nekas nemainās! :( Link to comment Share on other sites More sharing options...
*jancis38* Posted April 4, 2007 Author Report Share Posted April 4, 2007 ok liels padlies visiem! :* var lock, pačakarējos, un pats tiku galā! Link to comment Share on other sites More sharing options...
Paulinjsh Posted April 4, 2007 Report Share Posted April 4, 2007 Tad ieraksti risinājumu! Link to comment Share on other sites More sharing options...
*jancis38* Posted April 4, 2007 Author Report Share Posted April 4, 2007 (edited) httpd-vhosts uzrakstiju, šādi: <VirtualHost *:80> DocumentRoot "C:/Web/www/hostings/fire-tm.sytes.net" ServerName fire-tm.sytes.net ServerAlias fire-tm.sytes.net </VirtualHost> <VirtualHost *:80> DocumentRoot "C:/Web/www/" ServerName ibm.sytes.net ServerAlias ibm.sytes.net </VirtualHost> un vis aizgāja, tikai kad ieiet http://fire-tm.sytes.net browserī viņs rāda manu IP, nevis http://ibm.sytes.net Edited April 4, 2007 by *jancis38* Link to comment Share on other sites More sharing options...
Recommended Posts