0% found this document useful (0 votes)
381 views8 pages

How To Setup A Web Server On Your Raspberry Pi

The document provides instructions for setting up a web server on a Raspberry Pi. It details downloading and installing the Lighttpd web server and PHP. It also explains how to assign permissions and directories for hosting web pages and testing the server by accessing it on the local IP address.

Uploaded by

Steve Attwood
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
381 views8 pages

How To Setup A Web Server On Your Raspberry Pi

The document provides instructions for setting up a web server on a Raspberry Pi. It details downloading and installing the Lighttpd web server and PHP. It also explains how to assign permissions and directories for hosting web pages and testing the server by accessing it on the local IP address.

Uploaded by

Steve Attwood
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 8

How To Setup A Web Server On Your Raspberry Pi http://www.raspberrypi-spy.co.

uk/2013/06/how-to-setup-a-web-server-on-your-raspberry-pi/

1 of 8 5/5/17, 8:37 PM
How To Setup A Web Server On Your Raspberry Pi http://www.raspberrypi-spy.co.uk/2013/06/how-to-setup-a-web-server-on-your-raspberry-pi/

sudo apt-get update


sudo apt-get -y install lighttpd

sudo apt-get -y install php5-common php5-cgi php5

sudo lighty-enable-mod fastcgi-php

sudo service lighttpd force-reload

sudo ip addr show

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN


link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP qlen 1000
link/ether b1:11:ab:42:24:2c brd ff:ff:ff:ff:ff:ff
inet 192.168.0.45/24 brd 192.168.0.255 scope global eth0

2 of 8 5/5/17, 8:37 PM
How To Setup A Web Server On Your Raspberry Pi http://www.raspberrypi-spy.co.uk/2013/06/how-to-setup-a-web-server-on-your-raspberry-pi/

sudo chown www-data:www-data /var/www

sudo chmod 775 /var/www

sudo usermod -a -G www-data pi

sudo reboot

cd /var/www/html
sudo mv index.lighttpd.html index.lighttpd.hxxx

sudo wget http://www.raspberrypi-spy.co.uk/archive/misc/lighttpd_test.php.txt -O /var/www/html/index.php

3 of 8 5/5/17, 8:37 PM
How To Setup A Web Server On Your Raspberry Pi http://www.raspberrypi-spy.co.uk/2013/06/how-to-setup-a-web-server-on-your-raspberry-pi/

sudo nano /etc/lighttpd/lighttpd.conf

server.port = 40045

Select Month

sudo /etc/init.d/lighttpd restart

192.168.0.45:40045

4 of 8 5/5/17, 8:37 PM
How To Setup A Web Server On Your Raspberry Pi http://www.raspberrypi-spy.co.uk/2013/06/how-to-setup-a-web-server-on-your-raspberry-pi/

5 of 8 5/5/17, 8:37 PM
How To Setup A Web Server On Your Raspberry Pi http://www.raspberrypi-spy.co.uk/2013/06/how-to-setup-a-web-server-on-your-raspberry-pi/

6 of 8 5/5/17, 8:37 PM
How To Setup A Web Server On Your Raspberry Pi http://www.raspberrypi-spy.co.uk/2013/06/how-to-setup-a-web-server-on-your-raspberry-pi/

7 of 8 5/5/17, 8:37 PM
How To Setup A Web Server On Your Raspberry Pi http://www.raspberrypi-spy.co.uk/2013/06/how-to-setup-a-web-server-on-your-raspberry-pi/

8 of 8 5/5/17, 8:37 PM

You might also like