[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

No me van los dominios virtuales en apache



         He aquí mi httpd.conf (recortado):

AccessConfig /dev/null
AccessFileName .htaccess
BindAddress *
DefaultType text/plain
DocumentRoot /var/www/cyberchat2000.com
ErrorLog /var/log/apache/error.log
Group www-data
HostnameLookups on
KeepAlive On
KeepAliveTimeout 15
LockFile /var/run/apache.lock
LogLevel warn
MaxClients 150
MaxKeepAliveRequests 100
MaxRequestsPerChild 30
MaxSpareServers 5
MinSpareServers 3
NameVirtualHost 62.175.13.102:80
Options none
PidFile /var/run/apache.pid
Port 80
ResourceConfig /dev/null
ServerAdmin admin@cyberchat2000.com
ServerName www.cyberchat2000.com
ServerRoot /etc/apache
ServerTokens Minimal
ServerType standalone
StartServers 4
Timeout 300
UseCanonicalName on
User www-data

LoadModule   (bla bla bla)

Alias /icons/ /usr/share/apache/icons/
AddIcon    (bla bla bla)
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (VID,/icons/movie.gif) video/*

DefaultIcon /icons/unknown.gif
FancyIndexing on
HeaderName HEADER
IndexIgnore .??* *~ *# HEADER* README* RCS
ReadmeName README
DirectoryIndex index.php3 index.html
XBitHack off
CustomLog /var/log/apache/access.log hue
LogFormat "%{%b %d %H:%M:%S}t %h %{Host}i \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" hue
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T %v" full

AddEncoding x-compress Z
AddEncoding x-gzip gz
AddHandler server-parsed .html
AddLanguage    (bla bla bla)
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php4
AddType application/x-httpd-php .phtml
LanguagePriority es en fr de
BrowserMatch    (bla bla bla)

<Directory /usr/lib/cgi-bin>
  AllowOverride None
  Options ExecCGI
</Directory>

<Directory /usr/lib/cgi-bin/perl>
  SetHandler perl-script
  PerlHandler Apache::Registry
  PerlSendHeader On
  Options ExecCGI
</Directory>

<Directory /var/www/cyberchat2000.com>
  Options FollowSymLinks Includes
  AllowOverride None
  order allow,deny
  allow from all
</Directory>

<Directory /var/www/time.cyberchat2000.com>
  Options FollowSymLinks Includes
  AllowOverride None
  order allow,deny
  allow from all
</Directory>

<Location /cgi-bin/phf*>
  deny from all
  ErrorDocument 403 http://phf.apache.org/phf_abuse_log.cgi
</Location>

<VirtualHost 62.175.13.102:80>
  DocumentRoot /var/www/time.cyberchat2000.com
  ErrorDocument 403 http://www.cyberchat2000.com/errors/403.html
  ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
  ServerName time.cyberchat2000.com
</VirtualHost>

         Hay un  servidor virtual time.cyberchat2000.com cuyo  root como
     vemos es /var/www/time.cyberchat2000.com. Al  ir ahí se nos ejecuta
     un script en cgi-bin:

$ ls -l /var/www/time.cyberchat2000.com/
total 4
-rw-r--r--    1 root     root          217 Jun  6 21:40 index.html

$ cat /var/www/time.cyberchat2000.com/index.html
<html><head><title>La hora en Cyberchat 2000</title></head>
<frameset rows="100%,*" border="0" frameborder="0" framespacing="0">
<frame src="http://www.cyberchat2000.com/cgi-bin/time.sh"; noresize>
</frameset>
</html>

# cat /usr/lib/cgi-bin/time.sh
#!/bin/bash

echo -n 'Content-type: text/html'
echo
echo

LANG='es_ES.ISO-8859-15' date '+%e de %B de %Y, %H:%M:%S'
# _

         Sin embargo al telnetear:

$ telnet 62.175.13.102 80
Trying 62.175.13.102...
Connected to 62.175.13.102.
Escape character is '^]'.
GET / HTTP/1.1
Host: time.cyberchat2000.com

HTTP/1.1 200 OK
Date: Wed, 19 Sep 2001 21:21:23 GMT
Server: Apache/1.3.9
Transfer-Encoding: chunked
Content-Type: text/html

b1 
<html><head></head>
<frameset rows="21%, 79%" border=0 frameborder=0 framespacing=0>
 <frame src="frame1.html" noresize>
 <frame src="frame2.html" noresize>
</frameset>
</html>

0

         No nos  sale la hora,  sino el index.html del  DocumentRoot del
     servidor "principal", sin dominio virtual.

$ cat /var/www/cyberchat2000.com/index.html
<html><head></head>
<frameset rows="21%, 79%" border=0 frameborder=0 framespacing=0>
 <frame src="frame1.html" noresize>
 <frame src="frame2.html" noresize>
</frameset>
</html>
$ _

         Por si sirve de algo, tengo adsl y la IP visible desde internet
     la lleva el  desastroso router 3com (si alguien me  lee desde Vigo,
     quiere dinero y sabe ponerlo "en monopuesto", que me avise).

$ host time.cyberchat2000.com
time.cyberchat2000.com  CNAME   www.cyberchat2000.com
www.cyberchat2000.com   A       62.175.13.102
$ _


-- 
 David Serrano <cyberchat2000.com@hue> - Linux Registered User #87069

Attachment: pgpEgxeo4EzTE.pgp
Description: PGP signature


Reply to: