UBUNTU DUMP‎ > ‎

Web Server Install on Pi 1

posted 4 Oct 2017, 08:34 by Donald Ross   [ updated 4 Oct 2017, 08:34 ]
#install web server on pi 1 
#install apache 2
sudo apt-get install apache2 -y
#install php5
sudo apt-get install php5 libapache2-mod-php5 -y
#install php curl
sudo apt-get install php5-curl
#take ownership and rename index.html
sudo chown pi: /var/www/html/index.html
sudo mv index.html index.html.old
#create php index file
sudo nano index.php
<?php echo "Pi 1 with apache & php & php curl"; ?>
<?php echo date('Y-m-d H:i:s'); ?>
<?php phpinfo();?>
#save and exit
crtl o then crtl x
#restart apache
sudo service apache2 restart
Comments