Hi there,
I was trying to extent my Domoticz setup and found a php script that acts as an interface between Domoticz and IFTTT.In onder to get an active script it needs a webserver that includes php services. This is where Apache really started.
So the first step is to update apt with :
sudo apt update
The second step is to really install the apache2 server with :
sudo apt install apache2 -y
One can verify the installation by going to the directory that holds the main HTML files that are going to be visable. So :
cd /var/www/html
ls -al
We should be able to see the index file
The next steps are really about the problem that I had and it's about the access to the files in /var
So start by typing the next command :
sudo chown pi: index.html
After that I used :
sudo chown pi /var/www
The page that I used implied that I had access to the directory but I wasn't able to copy the script via the file-manager. ( permission error )
So the trick was to use the following commands ;
sudo -s
gksudo pcmanfm
This opens a different file-manager and that's abble to copy files later.
By default, Apache puts a HTML file in the previous mentioned web folder. This default web page is served at a certain IP number. You can find this IP by using the next command in host mode :
ifconfig
After that I closed and restarted the command prompt and continued with the other php files ;
sudo apt install php libapache2-mod-php -y
The last thing is to restart the PI with :
sudo reboot
That's it..
Additional information is in these links
:https://www.raspberrypi.org/documentation/remote-access/web-server/apache.md
:https://varunver.wordpress.com/2017/07/11/installing-apache-php-libapache2-mod-php/
:https://www.raspberrypi.org/forums/viewtopic.php?t=22068
:https://github.com/DPR7/domoticz-ifttt/wiki/Wiki-with-extra-instructions
I used a PI+B with Jessie as OS.
Comments
Please log in or sign up to comment.