14-may-2012, 16:09
|
#1 (permalink)
|
| Usuario activo
Fecha de Ingreso: octubre-2005
Mensajes: 4.693
| Apache y /etc/hosts
Hola,
Hace un rato el apache funcionaba perfectamente pero le he cambiado el hostname a la máquina de localhost a matrix y apache a dejado de resolver.
Voy al /etc/hosts:
192.168.1.4 localhost.localdomain localhost matrix
ifconfig -a:
inet addr:192.168.1.4
cd /etc/sysconfig
vi network:
NETWORKING=yes
HOSTNAME=matrix
httpd.conf:
#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If this is not set to valid DNS name for your host, server-generated
# redirections will not work. See also the UseCanonicalName directive.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address anyway, and this will make
# redirections work in a sensible way.
#
ServerName 192.168.1.4:80
<VirtualHost 192.168.1.4:80>
ServerAdmin e-mail
DocumentRoot /var/www/html
ServerName 192.168.1.4
ErrorLog logs/192.168.1.4-error_log
CustomLog logs/192.168.1.4-access_log common
</VirtualHost>
Esto me ha pasado fespués de moficar el hostname de la máquina y ha dejado de resolver.
|
| |