Setup Puppy to serve FTP NGIRCD and Hiawatha Web Server.

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
User avatar
Packetteer
Posts: 73
Joined: Sat 12 May 2012, 19:33
Location: Long Island Ny

Setup Puppy to serve FTP NGIRCD and Hiawatha Web Server.

#1 Post by Packetteer »

Hi All
Note this How to will work with Precise 5.5 and possibly later
versions of Precise. It may also work with other Puppy derivatives.
I have only tried this with Precise 5.5.

Also if I am in error with anything that follows please let me know
and I will edit this post to make it correct.

Precise 5.5 and possibly other puppy derivatives comes with PureFTPd installed.

PureFTPd Setup
The setup of PureFTPd is a simple matter of clicking on some Icons.
Note I have only used PurFTPd with anonymous logins.
Please also see my post about PureFTPd with use of flash drives.
http://www.murga-linux.com/puppy/viewtopic.php?t=90285

To start PureFTPd follow these steps.
1) Open ROX file manager
2) Left click on File-Sharing
3) Left click on Setup-Sharing
4) Left click on server
5) Left click on OK button
6) Leave Anonymous logins highlighted
7) Left click on OK button.
8) Either highlight Onetime or Everytime
9) Left click on the OK button

A message dialog box comes up saying that
"The FTP server has been started
The FTP directory is root/ftpd"

Any files or directories you put inside the root/ftpd directory will be
available for FTP down load by your connected FTP anonymous logins.

Note in order for others to login to your FTP server you would have
to instruct your router to listen for connects on port 21. You would also
have to have a static IP address with your ISP.

Hiawatha Web Server Setup
I have only tried this on Precise 5.5 Again I assume that later versions
of Precise and other Puppy derivatives come with Hiawatha installed.
You will find the Hiawatha configuration file in the following directory
/etc/hiawatha
Here is my Hiawatha configuration file.
I have added comments to describe the lines that you
have to change from the default configuration file that comes with
Hiawatha

Code: Select all

# lines that start with # are comments
ServerId = webuser
ConnectionsTotal = 150
ConnectionsPerIP = 10
SystemLogfile = /var/log/hiawatha/system.log
GarbageLogfile = /var/log/hiawatha/garbage.log

Binding {
	Port = 80
	Interface = Your Puppy PC static IP address
}
Binding {
	Port = 80
	Interface = 127.0.0.1
}
# the loop back or localhost or 127.0.0.1 ip address is the 
# default binding. This allows you to test your web server locally.
# I cut and pasted the default binding and then added my Puppy PC 
# static IP address.
Hostname = The Host name of your Puppy PC
# To find the host name of your Puppy PC please
# Left click on the desktop setup icon
# Left click on Connect to Internet or Intranet
# You will see Change host name on the right pane of the 
# dialog box that opens up. The text box contains your Puppy pc #Hostname
WebsiteRoot = /root/Web-Server
StartFile = index.html
AccessLogfile = /var/log/hiawatha/access.log
ErrorLogfile = /var/log/hiawatha/error.log

#add this stuff to get a perl script working (pplog)...
#QUISP has a binary executable CGI named 'quisp.bin'...
MimetypeConfig = /etc/mime.types
CGIhandler = /usr/bin/perl:pl
# If you want to use perl scripts to do cgi then uncomment the above line
CGIextension = pl,bin
ExecuteCGI = yes
#QUISP puts %0D, %0A (carriage-return, line-feed) chars in the url
#(v128), to allow chars below ascii 32 need this...
SecureURL = no
The following directory is where you will find the index.html file which
is the default file that Hiawatha opens.
root/Web-Server
Use Rox to navigate to the Web-Server directory. Use a text editor to
edit the index.html file to make it your own. Or use your favorite
HTML editor. I use the text based editor geany.

To start the Hiawatha web server please do the following.
1) Left click on the console desktop Icon
2) type the following
hiawatha
3) Press the enter key
4) Close the console

There is a very nice web site that enplanes how to do cgi scripts using
Perl.
http://www.cgi101.com/book/
The first 6 chapters of this book are on line at the above URL
Here is a HelloWorld CGI Bacon program

Code: Select all

 REM helloworld.bac
PRINT "Content-type: text/html"
PRINT ""
PRINT "<HTML>"
PRINT "<HEAD>"
PRINT "<TITLE>Hello World</TITLE>"
PRINT "</HEAD>"
PRINT "<BODY>"
PRINT "<H1>Hello World</H1>"
PRINT "</BODY>"
PRINT "</HTML>"
Compile helloworld.bac.
Copy the helloworld executable file to the root/Web-Server directory.
In the Web-Server directory rename the Helloworld executable file to
Helloworld.bin
Open your browser and type in the following url
http://localhost/Helloworld.bin
You should see a web page that contains
Hello World!
In head 1 size.

To learn more about Bacon close your browser and reopen it.
On the startup page scroll down to the word Bacon and click on it.
You did not remove Puppies browser startup page did you?

ngircd setup
Precise 5.5 does not come with an IRC server.
The one I use is ngircd.
1) open Puppies package manager and install ngircd
After install go to the following directory to make changes to the
ngircd configuration file.
/etc/ngircd
2) Edit the ngircd configuration file. The only changes you have to make
are shown in the following Nane and the Admin Lines.

Code: Select all

#
# This is a sample configuration file for the ngIRCd IRC daemon, which must
# be customized to the local preferences and needs.
#
# Comments are started with "#" or ";".
#
# A lot of configuration options in this file start with a ";". You have
# to remove the ";" in front of each variable to actually set a value!
# The disabled variables are shown with example values for completeness only
# and the daemon is using compiled-in default settings.
#
# Use "ngircd --configtest" (see manual page ngircd(8)) to validate that the
# server interprets the configuration file as expected!
#
# Please see ngircd.conf(5) for a complete list of configuration options
# and their descriptions.
#
# The original can be found at:
# /usr/share/doc/ngircd/examples/sample-ngircd.conf.gz

[Global]
	# The [Global] section of this file is used to define the main
	# configuration of the server, like the server name and the ports
	# on which the server should be listening.
	# These settings depend on your personal preferences, so you  should
	# make sure that they correspond to your installation and setup!

	# Server name in the IRC network, must contain at least one dot
	# (".") and be unique in the IRC network. Required!
	Name = irc.MakeUpYourOwnNameHere.net

	# Information about the server and the administrator, used by the
	# ADMIN command. Not required by server but by RFC!
	AdminInfo1 = Mesh User
	AdminInfo2 = Some City
	AdminEMail = irc@irc.somewhere.com
To start the ngircd IRC server please do the following.
1) Left click on the Console desktop Icon.
2) Type the following
ngircd -p
3) Press the enter key
4) Close the console window.

Again for remote users to be able to log in to your servers you will
need to have a static IP address for your router and a static IP address
for your Puppy PC.
Also the following ports will have to be open on your router
80 HTTP
21 FTP
Your puppy PC firewall if running will also have to have
port 80 and port 21 opened.

If anyone finds anything wrong with the above instructions then please
let me know and I will edit this post.

Thank you for your time in reading this post.
I hope it is of some help to someone sometime.
John

Post Reply