ALTERNATE WAY OF ACCESS POINT AND CAPTIVE PORTAL:

As explained in the previous 2 episodes, that creates an access point and related captive portal having limitations despite providing stable service with total access to your raspberry pi through the wireless connection. This is suitable for a fixed office network that provides internet service to employees and at the same time provides info to customers with no access to the internet.

An alternate method designed to work offline suitable for a mobile access point for local contents that are dynamic to provide interactive material to customers with the ability to have a feedback store in the form of a database.

sudo -i

curl -H 'Cache-Control: no-cache' -sSL https://raw.githubusercontent.com/tretos53/Captive-Portal/master/captiveportal.sh | sudo bash $0

To specify SSID during installation:

curl -H 'Cache-Control: no-cache' -sSL https://raw.githubusercontent.com/tretos53/Captive-Portal/master/captiveportal.sh | sudo bash $0 SSID_OF_YOUR_CHOICE


The wireless network will not provide access to the computer itself. Access can be obtained using a separate network interface.

Source: https://github.com/tretos53/Captive-Portal

The webpage that is to be edited is provided with an NGINX web server serving dynamic HTML that can link to other web pages and databases.

The database service best to be used along with it is MySQL server especially if it gets connected with MyPHPAdmin web interface thus getting databases to be dealt with using web gui as well as command line.

This is done first by installing PHP which is the server side programming language as opposed to Javascript that runs the underlying core of the client side HTML pages along with HTML itself.


sudo apt-get install php -y

cd /var/www/html/

sudo rm index.html

sudo nano index.php

<?php echo "hello world"; ?>

sudo service ngnix restart

sudo apt install mariadb-server php-mysql

sudo service ngnix restart

sudo mysql_secure_installation

Press Enter and Y for all options

sudo mysql --user=root --password

> create user admin@localhost identified by 'your_password';

> grant all privileges on . to admin@localhost;

> FLUSH PRIVILEGES;

> exit;

Install phpMyAdmin

sudo apt-get install phpmyadmin -y

dhconfig-common... select Yes

sudo phpenmod mysqli

sudo service nginx restart

http://ip/phpmyadmin to access the web GUI of the MySQL

sometimes you need to move the phpmyadmin folder to /var/www/html by:

sudo ln -s /usr/share/phpmyadmin /var/www/phpmyadmin

source: https://randomnerdtutorials.com/raspberry-pi-apache-mysql-php-lamp-server/