yetrus Posted August 29, 2012 Report Share Posted August 29, 2012 Hola Amigos tengo un problema, si coloco http:/localhost , se me va al primer virtualhost que coloque, en vez de ir a la url que corrsponde. si pongo la url del 2º me sale la pagina del 1º tengo esta configuracion en el httpd-vhosts.confayuda please !! <VirtualHost *:80> ##ServerAdmin [email protected] DocumentRoot "C:\WEB\www\webmail" ServerName webmail.MiDominio.cl ##ServerAlias www.dummy-host.localhost ##ErrorLog "logs/dummy-host.localhost-error.log" ##CustomLog "logs/dummy-host.localhost-access.log" combined </VirtualHost> <VirtualHost *:80> ##ServerAdmin [email protected] DocumentRoot "C:\WEB\www\Sitio" ServerName MiDominio.cl ##ServerAlias www.dummy-host.localhost ##ErrorLog "logs/dummy-host.localhost-error.log" ##CustomLog "logs/dummy-host.localhost-access.log" combined </VirtualHost> Link to comment Share on other sites More sharing options...
Ra Posted August 29, 2012 Report Share Posted August 29, 2012 En el 2º VirtualHost probaste con ServerName www.MiDominio.cl ?? Link to comment Share on other sites More sharing options...
yetrus Posted August 29, 2012 Author Report Share Posted August 29, 2012 Si pongo la IP del Server me sale el priemro, si coloco la ruta del 2º me sale el priemer sitiosi, los cambio orden, me sale la otra pagina. <VirtualHost *:80> ##ServerAdmin [email protected] DocumentRoot "C:/WEB/sitio/www" ServerName www.MiDominio.cl ##ServerAlias www.dummy-host2.localhost ##ErrorLog "logs/dummy-host2.localhost-error.log" ##CustomLog "logs/dummy-host2.localhost-access.log" combined </VirtualHost> <VirtualHost *:80> ##ServerAdmin [email protected] DocumentRoot "C:/WEB/Sitio/webmail" ServerName http://webmail.MiDominio.cl ##ServerAlias www.dummy-host.localhost ##ErrorLog "logs/dummy-host.localhost-error.log" ##CustomLog "logs/dummy-host.localhost-access.log" combined </VirtualHost> Link to comment Share on other sites More sharing options...
Ra Posted August 29, 2012 Report Share Posted August 29, 2012 Para lecturahttp://httpd.apache.org/docs/2.2/vhosts/examples.html Mira el ítem Using the ServerPath directive NameVirtualHost 172.20.30.40 <VirtualHost 172.20.30.40># primary vhostDocumentRoot /www/subdomainRewriteEngine OnRewriteRule ^/.* /www/subdomain/index.html# ...</VirtualHost> <VirtualHost 172.20.30.40>DocumentRoot /www/subdomain/sub1ServerName www.sub1.domain.tldServerPath /sub1/RewriteEngine OnRewriteRule ^(/sub1/.*) /www/subdomain$1# ...</VirtualHost> <VirtualHost 172.20.30.40>DocumentRoot /www/subdomain/sub2ServerName www.sub2.domain.tldServerPath /sub2/RewriteEngine OnRewriteRule ^(/sub2/.*) /www/subdomain$1# ...</VirtualHost> Link to comment Share on other sites More sharing options...
yetrus Posted August 29, 2012 Author Report Share Posted August 29, 2012 excelente compipa!!funciono de esta manera esto en el httpd.conf ServerName Ip-Publica:80 esto en el httpd-vhost.conf NameVirtualHost MiIpPublica:80 <VirtualHost MiIpPublica:80> ##ServerAdmin [email protected] DocumentRoot "C:/WEB/Sitio/www" ServerName www.sitiocorporativo.cl ##ServerAlias www.dummy-host2.localhost ##ErrorLog "logs/dummy-host2.localhost-error.log" ##CustomLog "logs/dummy-host2.localhost-access.log" combined </VirtualHost> <VirtualHost 200.54.159.139:80> ##ServerAdmin [email protected] DocumentRoot "C:/WEB/Sitio/webmail" ServerName webmail.sitioCorporativo.cl ##ServerAlias www.dummy-host.localhost ##ErrorLog "logs/dummy-host.localhost-error.log" ##CustomLog "logs/dummy-host.localhost-access.log" combined </VirtualHost> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now