Do I need Apache for a simple web-server?

What I'm trying to do is, allow someone on the local network to connect to my IP and access a file.

E.g. some random user connects and downloads from me: 192.168.2.10/file.doc

Do I need Apache to allow the user, to download the file from the directory.

Is there any other way of downloading the file, from my local IP.
I tried: 192.168.2.10/home/Astral/file.doc But that's obviously wrong, what's the best minimal installation of something to allow this simple task -__-
 
Apache may be a bit much for that. Try something way smaller like www/lighttpd. And without further configuration, any webserver will allow anyone to access/download any file under its DocumentRoot, so no special configuration will be needed.
 
No ports are needed either as the file could easily be downloaded using SSH/scp or even FTP.
 
@astralfx

... or even use python directly:
Code:
% [color="Blue"]cd ${HOME}/dir/with/that/file[/color]
% [color="#0000ff"]python -m SimpleHTTPServer 8080[/color]
Serving HTTP on 0.0.0.0 port 8080 ...

and send him link to your box: http://10.20.30.40:8080 from where anyone will be able to download this file, as You would not longer need it, You would just stop that python process.
 
@wblock, yes, I tend to forget about netcat being nc every time I need it. I think I'll just alias it.
 
I tried netcat but I spent too long faffing about, the Python script was so much simpler & easier.

Thanks vermaden.

Code:
import SimpleHTTPServer
import SocketServer

PORT = 1337

Handler = SimpleHTTPServer.SimpleHTTPRequestHandler

httpd = SocketServer.TCPServer(("", PORT), Handler)

print "Running HTTP server @ port: ", PORT
httpd.serve_forever()
 
Also is there a way to get a really simple FTP server running. I found this.

http://www.mythi.cx/python/pyFTPdrop.py

However found out it was UPLOAD only .. I need "download" mainly, however "upload" would also be nice :/

Any scripts which are really simple, I have no desire for security or whatever, just a really simple script/tool to allow any user on network to download a file via FTP from my machine :)

(Before you may ask "Why", I have my reasons. Windows CMD shell can only get files via FTP, and I don't have the luxury of installing tools such as wget on there machines, so need to stick to the basics of getting files via CLI)

_______________________________________________________________________________________
Edit: Nevermind, found one and edited it to my liking..
 
astralfx said:
Any scripts which are really simple, I have no desire for security or whatever, just a really simple script/tool to allow any user on network to download a file via FTP from my machine :)
Just enable the standard FTP service. Add to /etc/rc.conf:
Code:
ftpd_enable="YES"

And start it:
# service ftpd start
 
Back
Top