raspberry_rich
Posts: 8
Joined: Sat Jul 13, 2013 3:05 pm

using pi as webserver

Sun Jul 14, 2013 12:28 pm

My ultimate aim is to use my raspberry pi as a webserver so I can learn how to design websites using PHP, HTML, CSS and My SQL.

I'm using Debian on my raspberry pi. I have installed php and lighttpd on my raspberry pi. I have also installed FileZilla on my raspberry pi.

So when I'm in FileZilla on my raspberry pi I go to File - Site Manager... Then when I'm in Site Manager I click on My Sites then add a new site and name it New Site. Then I have to enter HOST. How do I know what to enter here? How do I know if I've set up lighttpd correctly?

Is it worth installing Cherokee?
Is it worth installing a different FTP?

I only have a 4GB SD card.

As I say the main aim is just to learn website building using PHP etc. So for now downtime of server is not an issue.

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: using pi as webserver

Sun Jul 14, 2013 1:41 pm

Do you have installed FileZilla Client or Server ?

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

raspberry_rich
Posts: 8
Joined: Sat Jul 13, 2013 3:05 pm

Re: using pi as webserver

Sun Jul 14, 2013 1:55 pm

SERVER

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: using pi as webserver

Sun Jul 14, 2013 2:37 pm

Err .. my question was stupid. FZ Server is Windows only.
Install a FTP server (vsftpd, proftpd) and connect from another machine.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

raspberry_rich
Posts: 8
Joined: Sat Jul 13, 2013 3:05 pm

Re: using pi as webserver

Sun Jul 14, 2013 2:47 pm

Install the FTP server on the pi?

Then use my windows 8 laptop to connect?

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: using pi as webserver

Sun Jul 14, 2013 2:51 pm

Or just use SFTP (server is already installed on Raspbian) , FilleZilla client does support it ,too.
You can use the FileZilla client on your Windows machine without problems.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

raspberry_rich
Posts: 8
Joined: Sat Jul 13, 2013 3:05 pm

Re: using pi as webserver

Sun Jul 14, 2013 2:57 pm

What do I have to enter in the command line after I've installed lighttpd with sudo apt-get install lighttpd?

raspberry_rich
Posts: 8
Joined: Sat Jul 13, 2013 3:05 pm

Re: using pi as webserver

Sun Jul 14, 2013 5:39 pm

FileZilla will not install on my windows laptop. All it want to do is install other programs.

I just cannot work out how to connect an FTP.

I just tried to connect from my windows laptop with smart FTP client installed but it comes up with an error stating: No connection could be made because the target machine actively refused it.
[18:37:56] Client closed the connection.
[18:37:56] Active Help: http://www.smartftp.com/support/kb/58
[18:37:56] Connect failed. Error=0x8007274d
[18:37:56] Waiting to retry (30s)...

It's not my firewall. Can someone help?

raspberry_rich
Posts: 8
Joined: Sat Jul 13, 2013 3:05 pm

Re: using pi as webserver

Sun Jul 14, 2013 6:06 pm

when I try to connect from my windows laptop using smart FTP it asks for host so I put in the ip address of my pi then it ask for user name so I use the username for the pi then it ask for password of the pi so I enter this and it wont connect. I've tried using a different internet connection from the pi on my laptop and the same internet connection and neither work. it just wont connect.

I've installed apache2. Which is the webserver right? Does it need the username and password for this? if so where would I find it? the only password I've had to set up is for the pi and mysql

WebPi
Posts: 262
Joined: Wed Apr 10, 2013 6:47 pm
Location: Birmingham, UK
Contact: Website

Re: using pi as webserver

Sun Jul 14, 2013 7:45 pm

I'm using Samba to access files on my Pi instead of FTP. It's a little easier to use once you've got it set up.

Yes, Apache2 is the webserver. Type ifconfig in a terminal window to find out your IP address, then on your laptop, open a browser and go to your's Pi's IP address. You should see a page saying 'It works'. No pass word is needed for Apache.
raspberrywebserver.com - Raspberry Pi tutorials
LinuxWebServers.net - Linux Web Server tutorials and examples
pyplate.com - Python web publishing tool

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: using pi as webserver

Sun Jul 14, 2013 7:59 pm

If FileZilla does not work , try WinSCP instead.
I did not show you how to install a FTP server yet , so a "pure"
FTP program will indeed not work.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

User avatar
jackokring
Posts: 816
Joined: Tue Jul 31, 2012 8:27 am
Location: London, UK
Contact: ICQ

Re: using pi as webserver

Sun Jul 14, 2013 9:34 pm

In Raspbian sftpd runs on port 22. Why use another ftpd tool? Why not just edit the apache config files to use a www directory in /home/pi? All good ftp clients will do sftp protocol too. And likely you'll need to edit the apache config to set the bound address.
Pi[NFA]=B256R0USB CL4SD8GB Raspbian Stock.
Pi[Work]=A+256 CL4SD8GB Raspbian Stock.
My favourite constant 1.65056745028

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: using pi as webserver

Mon Jul 15, 2013 10:07 am

I believe this assessment does not hold true for the Windows platform ...

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

deefunkt
Posts: 9
Joined: Fri Mar 15, 2013 11:19 pm

Re: using pi as webserver

Wed Jul 17, 2013 5:34 am

- Install vsftpd on pi using "sudo-apt get install vsftpd"
- Follow the instructions during installation.
- Edit "vsftpd.conf" in /etc to not allow anonymous login (you can do it I guess, but I'm paranoid)
- Edit "vsftpd.conf" to enable local users to login
- Install WINSCP on windows. Use the ftp port and ip address to log in to your pi's ftp server using pi account in the format [email protected]s:port

T3am5hark
Posts: 62
Joined: Wed Jul 17, 2013 5:37 pm

Re: using pi as webserver

Wed Jul 17, 2013 5:42 pm

Hi Rich,

One of my pi projects was writing an ultra-lightweight, easy to use web server (written in C++). If you're interested in trying it out you can get it here on GitHub - I'd be happy to get some feedback. There is a config file to set the port that it runs on and by default it's set to 8077 I think (I have it set there because I have it mapped on my router so I can access it remotely and ISPs tend to block port 80).

https://github.com/m2ware/OliWeb

It's pretty stable - I've run it for up to a month without interruption.

Return to “Networking and servers”