Search code examples
linuxubuntuapache2restrict

Restrict acess to port 8000 ( Using Apache ) - Ubuntu 14.04 Lts


I am really need of the help of Stackflow , I'm from Brazil , so.. Sorry for my Bad English...:)

I 'm running Ubuntu 14.04 Lts Server With Apache .

I've installed EtherCalc from : https://github.com/audreyt/ethercalc

This application run at port 8000

How can I protect the access to this port Using Apache ?

When someone try access https://192.168.8.132:8000/

he must put User and Login from .htpasswd.

My apache virtual host is like this.

<VirtualHost *:80> ServerName localhost ServerAdmin webmaster@localhost DocumentRoot /var/www/ <Directory /var/www/phpmyadmin> Order allow,deny allow from all </Directory> <Directory /var/www/phpipam> Options FollowSymLinks AllowOverride all Require all granted </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>

Can someone help me ?


Solution

  • Redirect request coming in on port 8000 to a different virtual host and to this add tighter access restrictions.

    Then proxy this virtual host to the application listening on port 8000.