Raspberry pi | Setup Apache version 2.4 http server
That is simply just another http web server powered by Apache Software
and the Raspberry pi Foundation with Raspbian Debian OS Stretch Lite on it.
❶ Installation routine
Please note that for this article we will be working under Microsoft Windows with PuTTy.
To install Apache2 standalone, execute the following command:
user@raspberry:~ $ sudo apt-get install apache2
To install Apache2 and PHP (optional) together, execute the following command:
user@raspberry:~ $ sudo apt-get install apache2 php5 libapache2-mod-php5
To install MySQL (optional), install a few packages with the following command:
user@raspberry:~ $ sudo apt-get install mysql-server mysql-client php5-mysql
❷ Change ownership
Take ownership of the web root:
user@raspberry:~ $ sudo su
root@raspberry:~# sudo chown -R pi /var/www/html
❸ First access
Enter the IP address of your Raspberry pi in your web browser.
You should see the page stored in /var/www/html/index.html. This is the default welcome page used to test the correct operation of the Apache2 server after installation on Debian systems.
How do I replace the index.html file after viewing? Just delete /var/www/html/index.html or replace
it with an index.html file of your own. You should replace this file before continuing to operate your http-server. If you know some basics in HTML you can put your own HTML files and other assets in this directory and serve them as your personal website.
❹ Check Apache service status
root@raspberry:~# service apache2 status
Just in case you have to do that.
root@raspberry:~# service apache2 restart
❺ Installation ftp client
You can use an application such as WinSCP
to connect via sftp which is safer and prevents the need to open up another port on your Raspberry pi.
With Linux you could deploy FileZilla.
root@raspberry:~# apt-get install filezilla
❻ Free webpage developing and publishing software
For MS Windows
Expression Web 4 - formerly MS Frontpage - is a full-featured professional tool for designing, developing, and publishing compelling, feature-rich websites that conform to web standards. Free and full version: www.microsoft.com/en-us/download/details.aspx?id=36179
Expression Design 4 is a tool for creative professionals and developers who want to build graphics for application user interfaces, the web, or any other medium. Free and full version: www.microsoft.com/en-us/download/details.aspx?id=36180
Please refer to 🛠 Software for Linux
🦊 Safer Mozilla Firefox
for more details.
is a lightweight, yet powerful, modern text editor. It blends visual tools into the editor so you get the right amount of help when you want it.
root@raspberry:~# apt-get install brackets
The job is done.