Jump to content

Welcome, Guest!

Master Yoda

  • Content count

  • Joined

  • Last visited

Community Reputation

1 Neutral

About Master Yoda

  • Rank
  1. How to install a Web server You will need: - a Raspberry Pi with all the appropriate cables (power, network cable connected to your network, keyboard, mouse, display) - an SD card with the debian image (you can follow this guide to create the image) Setting up a simple web server is very quick and easy following these steps: 1. Power on your Raspberry Pi, 2. When the login prompt appears enter your username and password (currently the default username and password are Username: pi Password: raspberry) 3. Create group www-data: sudo addgroup www-data After this command you might have to enter your password again 4. Install the lighttpd server: sudo apt-get install lighttpd Now we will create a basic HELLO WORLD web page and put it in the default directory that lighttpd server uses to serve it. To simplify this part we will do this with the Leafpad application in the graphical user interface: 1. Start the graphical mode: startx 2. Open the Leafpad application by clicking the menu button in the bottom left part of the screen then going to Accessories menu and selecting the Leafpad item. menu->Accessories->Leafpad 3. Copy the following text to the Leafpad: <!DOCTYPE html> <html> <head> <title>Rasberry Pi</title> </head> <body> <h1>This is my first webpage on the Raspberry Pi</h1> </body> </html> 4. Save the file: Click on the File -> Save As When the Save As dialog appears: - into the Name input line enter index.html - in the Places section of the dialog click on your user name (it has a house icon on its left side - the default at the time of the creation of this manual is pi) - press the Save button 5. Now we have to move the file to the appropriate location so that the lighttpd server can serve it: - Open the terminal application by clicking the menu button in the bottom left part of the screen then going to Accessories menu and selecting the LXTerminal item - Now move the file to the /var/www folder: sudo mv index.html /var/www/ - When you press enter you have to enter your password. Now you can see your website in your browser: 1. Click on the Web Browser shortcut in the bottom left of the screen (the earth icon) 2. Into the address line write You should see a web page with the title Raspberry Pi saying This is my first web-page on the Raspberry Pi. To share your web page with other people you have to give them your outside IP address. To find it out enter the "what is my ip" into the browser search bar and press enter. If you are accessing the Internet through a router you have to open the port 80 on your router and forward it to your Raspberry Pi network address. To do that consult the manual that came with your router. To learn more about HTML click here. Raspberry Pi is a trademark of the Raspberry Pi Foundation . Author Master Yoda Category Raspberry Pi Server Guides Submitted 06/22/2012 08:30 PM

About Us

Bringing you the latest Raspberry Pi news, tutorials and user forum.

The Fruity Computer