Enabling Apache Web Server and File Transfer for local network.(For Ubuntu based)
Ansh Kumar Pandey
1 min read
Most of the OS based on Linux kernel comes already with Apache2 service preinstalled but if you don't have the preinstalled follow my blog with Step-1 otherwise follow it from Step-2.
Step-1: Installing the Apache2 service
Command:- sudo apt-get install apache2
Note- I have installed it already on my machine.
Step-2: Enabling the Apache2 service
Command:- sudo service apache2 start
Step-3: Know your machine's IP
Command:- ifconfig
Note- If network tools aren't installed to your device. Do it by the following commands- sudo apt-get install ifconfig
Step-4: Open your browser & enter your machine IP
You will get a screen like this.
Step-5: Enabling firewalls and configuring it so that local devices connected in network can see it on port 80.
Commands:-
(i) sudo ufw enable
(ii) sudo ufw allow 'Apache'
(iii)sudo ufw allow from 192.168.0.0/24 to any port 80
(iv)sudo ufw default deny incoming
(v)sudo ufw status
Congratulations!!! now you can access the Apache2 web server from your local connected device.
Step-6: - Now make a directory in /var/www/html/ location and enjoy file sharing.
0
Subscribe to my newsletter
Read articles from Ansh Kumar Pandey directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Ansh Kumar Pandey
Ansh Kumar Pandey
I am a B.Tech (Comp. Science) student.