| 
																	
																	
																	
																 | 
																@ -1,37 +1,50 @@ | 
															
														
														
													
														
															
																 | 
																 | 
																# Locales | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																# Locales configuration | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																The time and language settings are allways checked for several tools, thus check and reconfigure them: | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																``` | 
																 | 
																 | 
																``` | 
															
														
														
													
														
															
																 | 
																 | 
																sudo dpkg-reconfigure locales | 
																 | 
																 | 
																sudo dpkg-reconfigure locales | 
															
														
														
													
														
															
																 | 
																 | 
																``` | 
																 | 
																 | 
																``` | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																# Web server | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																# Apache Web Server | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																First check that the apache package is already or not isntalled in your device | 
															
														
														
													
														
															
																 | 
																 | 
																``` | 
																 | 
																 | 
																``` | 
															
														
														
													
														
															
																 | 
																 | 
																dpkg --get-selection | grep apache | 
																 | 
																 | 
																dpkg --get-selection | grep apache | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																``` | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																If the package is not isntalled, please procced to install Apache: | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																```   | 
															
														
														
													
														
															
																 | 
																 | 
																sudo apt update | 
																 | 
																 | 
																sudo apt update | 
															
														
														
													
														
															
																 | 
																 | 
																sudo apt install apache2 | 
																 | 
																 | 
																sudo apt install apache2 | 
															
														
														
													
														
															
																 | 
																 | 
																``` | 
																 | 
																 | 
																``` | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																## status and configuration | 
																 | 
																 | 
																## status and configuration | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																To print out the services running on the device and their specific ports use:  | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																``` | 
																 | 
																 | 
																``` | 
															
														
														
													
														
															
																 | 
																 | 
																sudo netstat -tlpn | 
																 | 
																 | 
																sudo netstat -tlpn | 
															
														
														
													
														
															
																 | 
																 | 
																systemctl -all list-sockets | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																``` | 
																 | 
																 | 
																``` | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																Check that the port 80 is not used, otherwise, you will receive errors during the Apache installation or initialization. | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																``` | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																service --status-all | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																apachectl configtest | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																sudo service apache2  | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																``` | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																If this occurs, modify one of the next files at `/etc/apache2/` | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																The configuration files are: | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																- `apache2.conf` main configuration file for the server | 
																 | 
																 | 
																- `apache2.conf` main configuration file for the server | 
															
														
														
													
														
															
																 | 
																 | 
																- `ports.conf` configuring virtual server port numbers (80) as default | 
																 | 
																 | 
																- `ports.conf` configuring virtual server port numbers (80) as default | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																Then, restart the `apache2` service: | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																``` | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																sudo service apache2 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																sudo service apache2 restart | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																service --status-all | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																``` | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																# Web pages and scripts | 
																 | 
																 | 
																# Web pages and scripts | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																## HTML | 
															
														
														
													
														
															
																 | 
																 | 
																The index file for creating a web page is located on `/var/www/html/`. | 
																 | 
																 | 
																The index file for creating a web page is located on `/var/www/html/`. | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																The *Common Gateway Interface*(CGI) uses the next path for executing CGI scripts `/usr/lib/cgi-bin/` | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																## CGI | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																The *Common Gateway Interface* (CGI) uses the next path for executing CGI scripts `/usr/lib/cgi-bin/` | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																``` | 
																 | 
																 | 
																``` | 
															
														
														
													
														
															
																 | 
																 | 
																ls | 
																 | 
																 | 
																ls | 
															
														
														
													
												
													
														
															
																| 
																	
																	
																	
																		
																			
																		
																	
																 | 
																@ -55,5 +68,4 @@ lrwxrwxrwx 1 root root 26 Oct  3 03:29 cgi.load -> ../mods-available/cgi.load | 
															
														
														
													
														
															
																 | 
																 | 
																<html><head><meta charset="UTF-8"><title> BB</title></head><body><h1>Hello</h1><para>beaglebone | 
																 | 
																 | 
																<html><head><meta charset="UTF-8"><title> BB</title></head><body><h1>Hello</h1><para>beaglebone | 
															
														
														
													
														
															
																 | 
																 | 
																up for 03:35:43 up  2:51,  4 users,  load average: 0.00, 0.00, 0.00 | 
																 | 
																 | 
																up for 03:35:43 up  2:51,  4 users,  load average: 0.00, 0.00, 0.00 | 
															
														
														
													
														
															
																 | 
																 | 
																</para></html>┌─[debian][beaglebone][.../apache2/mods-enabled] | 
																 | 
																 | 
																</para></html>┌─[debian][beaglebone][.../apache2/mods-enabled] | 
															
														
														
													
														
															
																 | 
																 | 
																``` | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																``` |