Step 1 Apache installation
Apache installation
Before installing the server, make sure we have an up-to-date machine. To do this we must have administrator rights, either because of the sudo command.
sudo apt update sudo apt upgrade sudo apt update
Once the Raspberry Pi is up to date, we will install the Apache server.
The password for sudo usage is one that you typed and generically it is raspberry
The password for sudo usage is one that you typed and generically it is raspberry
For some additional power, you can tweak preferences-> Raspberry Configuration
- You can increase processing power by overclocking it and enable ssh mode for better control using the network.
- You will be shown
raspi-config
on first booting into Raspbian. To open the configuration tool after this, simply run the following from the command line:
sudo raspi-config
sudo apt install apache2
By the way, we’ll take advantage of it to give rights to the apache file that you can easily manage your sites. To do this, run the following commands:
sudo chown -R pi:www-data /var/www/html/ sudo chmod -R 770 /var/www/html/
Check if Apache is working type the IP or if you have connected the display try using http://localhost or 127.0.0.1
One more method of check
f you do not already have a GUI on your Raspbian, or you use SSH to connect to your Raspberry, you can use the following command:
wget -O check_apache.html http://127.0.0.1
This command will save the HTML code of the page in the file “check_apache.html” in the current directory.
So you only have to read the file with the command
So you only have to read the file with the command
cat ./check_apache.html
If you see marked at a location in the code “It works! ” is that Apache is working.
Apache uses the directory “/var/www/html” as the roo
Comments
Post a Comment