Como agregar nuevos puertos al servicio de Apache

0 Comments

Para un pequeño proyecto necesito probar conexion a un puerto X. Puede haber utilizado el netcat con ese fin, pero decidi mejor presentar una pagina web, por lo cual utilice apache escuchando en el puerto 990, ademas del 80 normal.

Editamos el archivo /etc/apache2/ports.conf , donde agregamos Listen #puerto, de la siguiente manera;

# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default
# This is also true if you have upgraded from before 2.2.9-3 (i.e. from
# Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and
# README.Debian.gz
NameVirtualHost *:80
Listen 80
Listen 990
# SSL name based virtual hosts are not yet supported, therefore no
# NameVirtualHost statement here
Listen 443

Como reiniciar Apache 2

Reiniciamos apache de la siguiente manera;

Debian / Ubuntu

:~# /etc/init.d/apache2

CentOS, Fedora, Redhat

:~# service apache2 restart

Ahora abren su explorador, ingresan su direccion ip en el nuevo puerto 990 y listo!

One Reply to “Como agregar nuevos puertos al servicio de Apache”

  1. Hola amigo, para reiciniar apache en CentOS o Fedora no es apache2 se llama httpd

    “service httpd restart”.

    Saludos

Deja tus preguntas o comentarios