Allow Access to Apache 2 Server on local network

5,656

The Solution is to allow traffic on port 80:

sudo ufw allow 'Apache'

You can verify the change by typing:

sudo ufw status
Share:
5,656

Related videos on Youtube

Iheb Saad
Author by

Iheb Saad

Updated on September 18, 2022

Comments

  • Iheb Saad
    Iheb Saad almost 2 years

    04.3 LTS.

    I want to allow access to other devices to my localhost. My IP is 192.168.1.249 and the apache server is working for those addresses:

    localhost/myapp
    esolutions/myapp
    192.168.1.249/myapp
    

    Here is My default config: /etc/apache2/sites-available/000-default.conf

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

    and my hosts file:

    127.0.0.1       localhost
    127.0.1.1       najda-PowerEdge-R430
    
    # The following lines are desirable for IPv6 capable hosts
    ::1     ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    
    192.168.1.249         esolutions
    

    Please help.

  • dipenparmar12
    dipenparmar12 almost 4 years
    what i can do for port 3000 or 8000
  • dipenparmar12
    dipenparmar12 almost 4 years
    got it sudo ufw allow 3000/tcp by the way thanks