--CGI can be executed with python -m http.server 8080 --cgi
--Apache 2 installed
-Please refer to Past Articles to set.
-- sudo usermod -aG gpio www-data
If I execute it without entering the previous command, no error is displayed, but there is no response on the Raspberry Pi. So check the error log.
When I check it as less /var/log/apache2/error.log
, I get the errorRuntimeError: No access to /dev/mem. Try running as root!
. Since it says "Try running it as a root", I gave it root privileges in the previous settings. www-data
is the Apache2 username.
Recommended Posts