Forum

Using only IPs for default and virtual server

efiguy
2 September 2009, 18:08
Hi,

Find your Wesite and Forum quite helpful but would appreciate some more enlightment on the following:

1) If Hiawatha has an IP based default port operational, How does one add the ports and IP for creating the

VirtualHost sections?? Does Binding command operate here ??
Nothing I've tried seems to be the correct syntax, like VirtualHostNameAddr
I've worked a week on this combing web for conf files

2) When and Where should an "Alias statement" be placed in the Conf file?
No web info explains this well - although the recent -- Samiux -- Post helps

Thank You for any help,

Jay

Hiawatha version: 6.14
Operating System: Puppy Linux
Hugo Leisink
4 September 2009, 12:56
1) How to use the Binding and VirtualHost commands is explained in the HOWTO pages. Have you read them?

2) An alias should be included in a host configuration section.
VirtualHost {
Hostname = www.example.com
...
Alias = ...
}
efiguy
5 September 2009, 00:38
Yes Sir, I have read each and every one of your How To, Faqs, forum bug, config, general, new features, all in entirety.
I know you must be very, very busy - but we all appreciate what you have accomplished and as an old man and a Nubie too some of the fore -shortened . . . answers are far - far beyond my present level of learning, but each and every one teaches a little more.
Either I misunderstand or they do not apply to what I am attempting. I am sorry, even the above (www.example.com) is not applicable in that Hostname is an IP like 192.168.1.133:2229, which Hiawatha doesn't seem to tolerate virtually.
Presently, I have 7 website directories in XP, Each directory has a Pablo Software Baby webserver using the same IP with a different port in each seperate INI file. Like this example 192.168.1.133:83 again as 192.168.1.133:2230
I really want to convert to Puppy Linux and Hiawatha, but cannot figure out syntax of Configuration file to make it operate, I have found that versions of Ap-- seem to address the virtual port binding allow all same IP with port address as the differencing agent.
I've worked on this for a solid week and am just lost. Surely others would do what I'm doing, the Router sorts the IP and Port to the outside world. http://69.243.173.60:86/

Thank you for your time,
Jay
Hugo Leisink
5 September 2009, 08:40
What you can do is the following:
Binding {
Port = 83
Interface = 192.168.1.133
BindingID = port83
}
Binding {
Port = 2230
Interface = 192.168.1.133
BindingID = port2230
}
Binding {
...
}
...

VirtualHost {
Hostname = 192.168.1.133
WebsiteRoot = <path to first website>
RequireBinding = port83
...
}
VirtualHost {
Hostname = 192.168.1.133
WebsiteRoot = <path to second website>
RequireBinding = port2230
...
}
VirtualHost {
...
}
...


Note that the configuration check tool called wigwam (included with Hiawatha) will complain about using the same 'hostname' multiple times. Disable the usage of Wigwam (edit Hiawatha.bat) to get Hiawatha started.
efiguy
6 September 2009, 18:45
Thank You for the great example,
Have created a simple httpd file for testing with a precompiled Puppy-Hiawatha release of 6.14 ,
But cannot find the Hiawatha.bat file to modify. Since this puppy version is quite limited in tools, loaded a CD of Puppy 3.01 into ram as it includes PFind, mounted the puppy Hiawatha partition and searched for many combinations of Hiawatha, wigwam and bat without success. Actually, at this juncture, I am not sure wigwam is included in this 6.14 puppy package release, for it only shows in a directory where I personally downloaded Ver 6.16 package.

Working carefully to check all syntax and spacing to duplicate what you have sent, what else (v6.14) might prevent the startup of Hiawatha with a httpd modeled on the one you sent?
If I comment out all the New Virtual Material, leaving only the default server settings it will startup OK .

Thank You,
Jay


Hugo Leisink
6 September 2009, 22:52
Since you mentioned you were using Pable Baby Web Server (which is a Windows program), I assumed you used Hiawatha for Windows too.

If you use Hiawatha for Linux, just run the hiawatha binary (probably installed in /usr/local/sbin). The wigwam tool is located in the same directory as hiawatha. Wigwam is included in the Hiawatha package since 5.0.
efiguy
8 September 2009, 02:08
Hello,
Trying to run either Wigwam or Hiawatha from this directory /usr/local/sbin , Nothing happens, checking system process shows nothing new also. They are listed as executabale in permissions. There is a menu selection called - servers - that opens a small control screen - it seems this is the only way to start the server system. It will not startup with the virtual host as below
VirtualHost {
Hostname = 192.168.1.133
# WebsiteRoot = /usr/myhtmsavs
WebsiteRoot = /mnt/sda2/web_7/files/quert
RequireBinding = port83
StartFile = index.html
}


All parts of this, the path, index, and such have been successfully used in the default server settings as a check.
But if Virtual host is commented out, Hiawatha will start with the port binding as follows and an external PC browser will register the default website path Example 192.168.1.133:80 and 192.168.1.133:83 show the same index.html --
Binding {
Port = 83
Interface = 192.168.1.133
BindingID = port83
}


I can not find any AUTORUN or other file to control Hiawatha startup, but if the CONF file is OK it will start on a reboot.

Hopeful for more suggestions
Thank you again,
Jay
efiguy
25 September 2009, 22:28
Hi Hugo,
Version 6.14 Puppy
Have went through puppy forum looking for wigwam and virtual host references (They had discovered problem with text host names I'd quote but don't know how ), with out much success toward my common IP problem, have left posts but no one has answered.
What file could you suggest in Linux Puppy that would need editing to turn off within Hiawatha / Wigwam.

Thank You
Jay

Hugo Leisink
25 September 2009, 23:56
Sorry, I must have missed your previous post.

You say you start hiawatha and nothing happens. If Hiawatha starts without an error, it will not show any message on the command line. Hiawatha should be visible in your process list.

What does the error logfile say? What do you see when you point your browser to port 83 of your webserver?
Peter
26 September 2009, 12:25
Hi,

Just a thought that came to my mind - not knowing the details of Puppy Linux, but when choosing to use non-standard http unix port numbers make sure that you do not have other services using those ports.

The safest choice for the port numbers are 49152 through 65535, you might want to refer to this list on available port numbers http://www.iana.org/assignments/port-numbers .

Rgds,
Peter
efiguy
28 September 2009, 19:19
Hello Peter,
Appreciate your post, Before getting too involved with home servers, became involved with Firewalls and Win98- and XP home networking w/wifi, learning more of the common - extended port ownership and took a several month survey of our home network (About 20 different PC's) port usage. This also led to finding out that many ISP's take a dim view of the upper ports, blocking much of the extended range today.
Jay

efiguy
28 September 2009, 20:29
Hello Hugo,

(Preprogramed Puppy Linux 4.1 Hiawathia 6.14)

" Most important for me presently is solving the Multiple Same IP problem with VirtualHost "

I do not know what file you spoke of in an earlier post that must be edited for WigWam (or where it is located) configuration to let Identical IP's to co-exist together.

Would there be some menu configuration some place that turns off Wigwam ?

All that seems to operate toward Hiawatha is this - Control Menu selected from "Puppy menu button"
Control menu consisting of these headings and buttons:
I can confirm operation via the - Process Manager - Mouse clicking on directory files does nothing

Start/Stop Servers
menu
Start Server -B-
Stop Server -B-
Start Mysql -B-
Stop Mysql -B-
Start/Stop FTP -B-


Using the Configuration listing below - The Process Monitor confirms that (Hiawatha and 4 lines of PHP-CGI load) and browsers confirm this operates.
Here is a Config that functions on internal Seamonkey and external network PC
# GENERAL SETTINGS
#
ServerId = nobody
ConnectionsTotal = 150
ConnectionsPerIP = 10
#
Binding {
Port = 80
Interface = 192.168.1.133
}
#
CGIextension = cgi
#
# DEFAULT WEBSITE
#
Hostname = 192.168.1.133
# WebsiteRoot = /mnt/sda2/web_7/files/quert
WebsiteRoot = /usr/myhtmsavs
# Websiteroot = /root/ghttpd/htdocs//default
StartFile = index.html
# ExecuteCGI = yes
# TimeForCGI = 5


The Configuration below Does Not Operate and is confirmed by Process Monitor as only 4 lines of PHP-CGI load (usr/local/bin/php-cgi ....)
Here is a Config that Does Not function on internal Seamonkey and external network PC
# GENERAL SETTINGS
#
ServerId = nobody
ConnectionsTotal = 150
ConnectionsPerIP = 10
#
Binding {
Port = 80
Interface = 192.168.1.133
}
#
Binding {
Port = 83
Interface = 192.168.1.133
BindingID = port83
}
#
CGIextension = cgi
#
# DEFAULT WEBSITE
#
Hostname = 192.168.1.133
# WebsiteRoot = /mnt/sda2/web_7/files/quert
WebsiteRoot = /usr/myhtmsavs
# Websiteroot = /root/ghttpd/htdocs//default
StartFile = index.html
# ExecuteCGI = yes
# TimeForCGI = 5
#
# VIRTUAL HOSTS
#
VirtualHost {
Hostname = 192.168.1.133
# WebsiteRoot = /usr/myhtmsavs
WebsiteRoot = /mnt/sda2/web_7/files/quert
RequireBinding = port83
StartFile = index.html
}


Is it necessary to use REQUIRED_BINDING= LAN someplace in httpd config?

So close - So Frustrated at my Ineptitude

posted from Server PC
Thank you
Jay
efiguy
6 October 2009, 02:28
Hi Hugo,

In 6.14 - Linux, using the above previous post virtual host configuration - What are the files that need to be edited to stop wigwam from preventing Hiawathia startup?

Thank you,
Jay
Hugo Leisink
6 October 2009, 08:47
I don't know how Puppy linux does the deamon startups, but if it's the same as other Linuxes, you have to look at /etc/init.d/hiawatha or /etc/rc.d/hiawatha or wherever the init scripts are located.
efiguy
7 October 2009, 08:07
Hi Hugo,

Found the the Init files Puppy is using /etc/hiawatha etc/init.d etc/rc.d
File - rc.httpd - was made non-executable to stop boot startup for now - Inside commented
out most of CGI PHP related calls where found. The system process now only shows one line for Hiawatha using these directories /usr/sbin/hiawatha /etc/hiawatha
Nothing I've found prevents Wigwam tests - making wigwam non-executable doesn't help either as Hiawatha never will start.

On 09-05, post you used the command word - RequireBinding = port83 - But I have not
been able to find that spelling in manual pages,
However substituting the command word - RequiredBinding = port83 - allows Hiawatha to
start-up from menu control.

But when tested. IP 192.168.1.133/ IP 192.168.1.133:80/ IP 192.168.1.133:83/
all of these deliver the Default port 80 web path.
The VirtualHost information is being ignored. Port 83 is apparently being bound OK, as the
external browser gives no errors.

Does the bare Hiawatha Server need php and cgi to deliver virtual host operation?

Thank you,
Jay
Hugo Leisink
7 October 2009, 08:49
Can you post the Puppy init scripts? So I can take a look at it.

Hiawatha does NOT need CGI / PHP to serve virtual hosts.
efiguy
7 October 2009, 15:05
Hi Hugo,
Hope these are what you are looking to study. If not, give me some file names to find and search.

ect/rc.d/init.d/rc.httpd
#
#!/bin/sh
#
# /etc/rc.d/rc.httpd
#
# Start/stop/restart/graceful[ly restart]/graceful[ly]-stop
# the Hiawatha (httpd) web server.
#
# To make Hiawatha start automatically at boot, make this
# file executable: chmod 755 /etc/rc.d/rc.httpd
#
# For information on these options, "man apachectl".
case "$1" in
'start')
# /usr/sbin/php-fcgi -k
# /usr/sbin/php-fcgi -k
# /usr/sbin/php-fcgi -c /etc/hiawatha/php-fcgi.conf
/usr/sbin/hiawatha -c /etc/hiawatha
;;
'stop')
# /usr/sbin/php-fcgi -k
killall hiawatha
rm -f /var/run/hiawatha.pid
;;
*)
echo "Usage: $0 {start|stop}"
;;
esac



The httpd file

ect/hiawatha/httpd.conf
#
# GENERAL SETTINGS
# //////root/ghttpd/htdocs//default////
# /////// /initrd/pup_ro2/usr/share/doc/rc.firewall/ ////////
# //////// initrd/pup_ro2/usr/share/doc/wvdial/ /////////
# ////////// /initrd/pup_ro2/usr/share/doc/ //////////
# ////////// /usr/share/doc/ ////////
#
#
ServerId = nobody
ConnectionsTotal = 150
ConnectionsPerIP = 10
# RequiredBinding = LAN
#
#
#
#
Binding {
Port = 80
Interface = 192.168.1.133
}
#
#
#
Binding {
BindingID = port83
Port = 83
Interface = 192.168.1.133
}
#
#
#
# Binding {
# Port = 84
# Interface = 192.168.1.133
# BindingID = port84
# }
#
# Binding {
# Port = 86
# Interface = 192.168.1.133
# BindingID = port86
# }
#
# Binding {
# Port = 2229
# Interface = 192.168.1.133
# BindingID = port2229
# }
#
# Binding {
# Port = 2230
# Interface = 192.168.1.133
# BindingID = port2230
# }
#
# CGIextension = cgi
#
#
# DEFAULT WEBSITE
# It is wise to use your IP address as the hostname of the default website
# and give it a blank webpage. By doing so, automated webscanners won't find
# your possible vulnerable website.
#
Hostname = 192.168.1.133
WebsiteRoot = /mnt/sda2/web_7/files/quert
StartFile = index.html
# ExecuteCGI = yes
# TimeForCGI = 5
#
#
# VIRTUAL HOSTS
# Use a VirtualHost section to declare the websites you want to host.
#
#
#
VirtualHost {
Hostname = 192.168.1.133
RequiredBinding = port83
WebsiteRoot = /usr/myhtmsavs
StartFile = index.html
}
Michel
9 October 2009, 22:34
Hi Hugo,
I've tried your suggestion and disable the wigwam call in the demon script with result="0"
However, I can't display the virtual host homepage, instead, I get the default homepage.
Idem for the logs.
Here is my configuration file:
Binding {
Port = 8080
Interface = 192.168.0.28
BindingID = port8080
}

# for virtual hosts
Binding {
Port = 8008
Interface = 192.168.0.28
BindingID = port8008
}
...
Hostname = 192.168.0.28

WebsiteRoot = /usr/local/var/www/hiawatha
StartFile = index.html
AccessLogfile = /usr/local/var/log/hiawatha/access.log
ErrorLogfile = /usr/local/var/log/hiawatha/error.log
#ErrorHandler = 404:/error.cgi


# VIRTUAL HOSTS
# Use a VirtualHost section to declare the websites you want to host.
#
VirtualHost {
Hostname = 192.168.0.28
RequiredBinding = port8008
WebsiteRoot = /home/3w1/html
StartFile = index.html
AccessLogfile = /home/3w1/log/access.log
ErrorLogfile = /home/3w1/log/error.log
}
Hugo Leisink
10 October 2009, 12:45
You need to specify a RequiredBinding for both websites. Since the default website can't have a RequiredBinding, you have to make both websites virtual and use a blank page for the default website.

Please, try this configuration:

Binding {
Port = 8080
Interface = 192.168.0.28
BindingID = port8080
}

# for virtual hosts
Binding {
Port = 8008
Interface = 192.168.0.28
BindingID = port8008
}

Hostname = 127.0.0.1
WebsiteRoot = /path/to/empty/webpage

VirtualHost {
Hostname = 192.168.0.28
RequiredBinding = port8080
WebsiteRoot = /usr/local/var/www/hiawatha
StartFile = index.html
AccessLogfile = /usr/local/var/log/hiawatha/access.log
ErrorLogfile = /usr/local/var/log/hiawatha/error.log
#ErrorHandler = 404:/error.cgi
}

# VIRTUAL HOSTS
# Use a VirtualHost section to declare the websites you want to host.
#
VirtualHost {
Hostname = 192.168.0.28
RequiredBinding = port8008
WebsiteRoot = /home/3w1/html
StartFile = index.html
AccessLogfile = /home/3w1/log/access.log
ErrorLogfile = /home/3w1/log/error.log
}
Michel
10 October 2009, 14:58
I get the following: access logs files are OK, no errors.
But I still get the hiawatha index file instead of 3w1 on 192.168.0.28:8008
The basic conf is;
...
Hostname = 127.0.0.1
# empty web page
WebsiteRoot = /usr/local/var/www
StartFile = index.html
...
With a 0 octet file for /usr/local/var/www/index.html
Hugo Leisink
10 October 2009, 16:10
Have you tried making your own local domain name via bind? Then you can create all the hostsnames you want. Use a single binding (port 80) and use different hostnames for each binding. Far more easier than what you try to achieve now. Using the same hostname for multiple websites on the same server conflicts with who HTTP/1.1 was designed.
Michel
10 October 2009, 22:20
Well, configure a DNS server is not so trivial and is useless on my local machine.
I think a local IP configuration with virtual hosts on different ports is perfect for testing and is rather common:
http://teaching.cs.uml.edu/Texts/OReillyCDBookshelf/linux/apache/ch03_08.htm

I've tried to use IP aliasing with two different addresses and the following config:
Binding {
Port = 8080
Interface = 192.168.0.28
BindingID = address28
}

Binding {
Port = 8080
Interface = 192.168.0.29
BindingID = address29
}
...
Hostname = 127.0.0.1
# empty web page
WebsiteRoot = /usr/local/var/www
StartFile = index.html

VirtualHost {
Hostname = 192.168.0.28
RequiredBinding = address28
WebsiteRoot = /usr/local/var/www/hiawatha
StartFile = index.html
AccessLogfile = /usr/local/var/log/hiawatha/access.log
ErrorLogfile = /usr/local/var/log/hiawatha/error.log
#ErrorHandler = 404:/error.cgi
}

VirtualHost {
Hostname = 192.168.0.29
RequiredBinding = address29
WebsiteRoot = /home/3w1/html
StartFile = index.html
AccessLogfile = /home/3w1/log/access.log
ErrorLogfile = /home/3w1/log/error.log
}

The result is more or less the same with hiawatha index page on adress29.
In fact, the server looks for the right page because if I change the name of /home/3w1/html/index.html, I get a 404 error, but display /usr/local/var/www/hiawatha/index.html
Seams to be a bug.
Hugo Leisink
10 October 2009, 23:54
If you use it only on your local machine, it's even more simple. Just add hostnames to your /etc/hosts file and use those in the virtual host configurations.

I just tested the RequiredBinding setting myself. It works as it should. There is no bug. When you used the address BindingIDs, to what IP address where you connecting?
efiguy
11 October 2009, 05:14
Hi Hugo,
I might mention that I have found references of Linuix kernals needing configured to add multiple IP addresses with a web server, It is just something found recently, don't know if applicable, if interested, think they are bookmarked and would post.
Questions -
How do you do the special name "bind" suggested to Michael ?
I am confused as how Hiawatha is setup to specify a TCP/IP port - I've always used - Example 192.168.1.133:8008 , BUT find this in manual - Example: set local_net = 192.168.1.0/24
Is that 24 a port? maybe hours?
What does this really reference?
Example: BindingId = LAN
Is this just a unique name used within the Configuration OR is this the physical hardware that creates the network?
And where and when should BindingId = LAN word LAN be used?

Also when and where do we require command - example UserWebsites = yes|no

What about using command LISTEN ?

I believe Michel is essentially trying to accomplish what I desire to do, Use a machine common IP and reference different port numbers as unique servers, only he is more skilled in troubleshooting and explaining what the results are -- Quote Michel - In fact, the server looks for the right page because if I change the name of /home/3w1/html/index.html, I get a 404 error, but display /usr/local/var/www/hiawatha/index.html
This is action you describe in configuration pages, Server defaults to NON virtual address, I've worked on this for 2 months with you and have Virtually no success .
From my searches on the web, using different ports was a common feature a few years back -- even commercially, Today it seems that Commercial interests dominate and Name servers are the "In Thing" , HOWEVER, I need to point out -- Many of us today have home access with Wide-Bandwidth - and it is attractive to use IP and TCP/IP Port - Based Servers for our extended families and friends, lagging and bypassing the Commercial Interests that want to charge for NAMES.
What I am trying so desperately to say is - There is a Large Body Of People that could be very interested in using YOUR server,
You see, I have to regularly rebuild my present servers for "Experienced Outsiders" rip it apart and try for other things on my small network also.
We really need this stop intrusion capability - that other more experienced users (Samiux, Prit1, etc) have found with Hiawatha, I don't want to be defeated or give-up and surrender to an virtualhost operating Apache using the same Puppy on another partition.
Heck, If I could figure out how to run multiple instances of the base default server I would - Even Do That - because of the base security features you have included, WHAT you have is UNIQUE. I even aspire to learn CGI techniques, as have found an old book and disk at specialty book store.
I know and respect that Hiawatha, is a diversion , maybe even a toy for you, And yet, some of us (out here accross the world) sit on the edge of our seats waiting for every word you write, hoping that it turns our "lump of coal" PC - to Gold

Thank You,
Jay


Hugo Leisink
11 October 2009, 12:01
192.168.1.0/24 is the common notation for subnets. Search wikipedia for what a subnet is.

When and where BindingID is used is described many times in this topic and can also be found in the manual page. Hiawatha doens't have a LISTEN command. That's an Apache thing. Hiawatha uses Binding blocks.

About IP based hosting: Hiawatha can do it. I just tested it again myself 5 minutes ago. This is the configuration I used:
Binding {
Port = 8000
BindingID = P0
}
Binding {
Port = 8001
BindingID = P1
}

Hostname = 127.0.0.1
WebsiteRoot = /var/www/blank

VirtualHost {
Hostname = 79.170.95.63
WebsiteRoot = /var/www/website0
RequiredBinding = P0
}

VirtualHost {
Hostname = 79.170.95.63
WebsiteRoot = /var/www/website1
RequiredBinding = P1
}


First thing you have to understand: the default website (the one NOT inside a VirtualHost block) cannot have a RequiredBinding. The reason is that the default website is the one which Hiawatha will show when an unknown website is requested. If the default website is restricted with a RequiredBinding, Hiawatha might not be able to show anything to the connected client.

Also make sure you give the default website an hostname (an IP address in your case) that does NOT match the ones you will give to your websites. Otherwise, Hiawatha will see that the default website's hostname matches the one inside the request and will show that one to the used. My advice is to use localhost's IP.

Use VirtualHost blocks to define your websites. Point them to a different WebsiteRoot, use RequiredBindings and it will work. Make sure to remove wigwam from your Hiawatha startup script. I know it's more or less the same thing as in my previous post. But if you ask the same question you asked before, I can do two things: ignore the repeated question or repeat my previous answer. To show you that I really do want to help, I'll repeat my previous answer.

And believe me, Hiawatha is no toy to me. I've been a freelance webdeveloper for about 1.5 year and used Hiawatha to host my websites. My income depended on it. I still have a webserver with more than 60 websites on it. A good friend of mine who is still freelance webdeveloping still depends on Hiawatha's stability, security and robustness. So trust me, Hiawatha is a serious project to me.
Michel
11 October 2009, 20:03
Hi Hugo,
the server is still mixing the pages.
I have done few more tests and it is clearly a problem with the cache.
Once a StartFile is in the cache, the server send the StartFile from the cache whatever virtual host you ask for.
Even is the file names are different, what was confusing.
The only way to display the right file is to save it, so the server will reload the file from the file system.
Perhaps, for your tests, you have used a version without cache.
Hugo Leisink
11 October 2009, 21:50
If IP-based hosting causes cache problems, I think you should try using normal hostname based hosting. Forget the port binding. If you don't want to pay for a domain name, try a free alternative like DynDNS [www.dyndns.com].

Weird thing is that I can't reproduce the problem here. The cache works fine. Are you sure it's Hiawatha's cache which is causing the problem and not the browser cache?
efiguy
14 October 2009, 13:43
Very Impressive, Thank you,

I must load a "ram based Puppy" to be able to perform a search in the Hiawatha partition.

What "wording" should be used to find the control file or script that controls the WigWam startup checking in version 6.14.

Appreciate the DynDns link

Thank You,
jay

Hugo Leisink
14 October 2009, 13:50
Hiawatha comes with a init.d start/stop script, but it looks like the creators of Puppy didn't use that one and created their own Hiawatha start/stop script. I have no Puppy Linux installed somewhere, so I can't answer your question. Please ask about the script that controls wigwam at the Puppy Linux forum.
efiguy
14 October 2009, 21:25
Hugo, I have,

"Posted: Fri 11 Sep 2009, 18:29 Post subject: Webserverpuppy Hiawatha 6.14
Subject description: Startup Configuration files"

No one answered!

No matter what they used - Doesn' t Wigwam have to still use your underlayment command structure?

Thank you,
Jay
efiguy
19 October 2009, 20:33
Hugo, Please don't fall out of your chair!!!

I have three (Count them 3) servers running on only IP's
They are simple -- most likely the simplest possible.
Found a PHP config and commented most all of it out, as well as an fcgi config
Also a rc.httpd file now has only path info active

I was over to the manual page worrying over security setup, and seem to remember reading recently that someone (Maybe Samiux) had uploaded a sample security control file that they were using on their site,
Can't find it today,

Or could you point me to a forum listing that I might start with as a quick template for non-cgi, non-php safety.

Sent from server PC
Jay



Hugo Leisink
20 October 2009, 00:38
What kind of security do you want to improve? Hiawatha offers several security features.
efiguy
20 October 2009, 03:45
Hi Hugo,
I am asking for guidance on this, as this issue of Puppy 412 does not even have a firewall -

(My present ms stuff has a firewall and still gets creamed by "experienced outsiders", then I just lay a new image in place, try some more patches and they'll be back for another run.)

The manual lists lots of what I would surmise as security commands:

ConnectionsPerIP
BanOnCMDi
BanOnFlooding
KickOnBan
BanOnTimeout
BanOnMaxReqSize
BanOnMaxPerIP
BanOnGarbage
BanlistMask
RebanDuringBan
ReconnectDelay
Throttle
EnableTRACE
MaxRequestSize
MaxUploadSize
MaxKeepAlive
TimeForRequest

Hiawatha Ver 6.14 Questions:

Are there default values present within Hiawatha for all of these?

Are these commands to be placed within the same "httpd.conf" file where the ports and hosts are placed?

If so, is it critical as to sequence or postioning within the "httpd.conf" file?


Thank You so very much
Jay
efiguy
21 October 2009, 16:45
Hello Hugo,

Have 1R+7V servers (Puppy) under test on my intranet (5Gb). Simple config, no enhancements, Set the Puppy cpu for Hiawatha as High. It is blazingly FAST accross network from this old IBM 6280, less than 4 seconds to display a 60 Meg Tiff from (dad's WWII newsletter) the HD. WOW!

Have downloaded your 6.17.1 tar for OpenBSD and am going to attempt to setup a new drive with OpenBSD.

Really need guidance from previous post Sequence of last 3 questions so that the 6.14 disk may be placed online.

Thanks,
Jay
Hugo Leisink
21 October 2009, 17:15
What do you mean with "creamed by experienced outsiders"?

Default values are described in the manual page.

Each command in the manual page is placed in a chapter. Each chapter belongs to a section (binding, virtual host, directory, etc). Read the first lines of each chapter to see for which section it is.

The position in the configuration file is not important. The only sequence that counts is the sequence of the virtual host sections. Don't place hostnames with a wildcard before hostnames in the same domain. For example:
VirtualHost {
Hostname = www.example.com, *.example.com
...
}

VirtualHost {
Hostname = test.example.com
...
}

wont work. You have to change it to:
VirtualHost {
Hostname = test.example.com
...
}

VirtualHost {
Hostname = www.example.com, *.example.com
...
}
efiguy
22 October 2009, 04:01
4 a : to defeat decisively <was creamed in the first round> b : wreck <creamed the car on the turnpike> c : to hit with force : smash <the quarterback got creamed by the pass rush>

"More experenced outsider"
Rogue crackers or hackers are always port sampling the MS systems on my ISP, while using Opera 2 days ago on one system, looking for PC based fuel injection systems, Opera spontaneously closed, and a short time later the PC rebooted, on restart ran - MS root kit revealer and had several errors from registry and cryptography section - Good thing to have removed all IE componets, Multimedia, and shutdown nearly all services, for I could have lost the installation, as it turned out - logs indicated multiple sequential port probes from Hungary, CA, Virginia, and Georgia - all with close time frame to episode.

The MS server has even had notes left inside the log page for me, Grammer clues indicated to me these were Asian -- I don't know how they did that! Those guys at least left the base system operating.
Others leave bombs that rewrite partition or MBR. so that when restarted - it doesn't.

On another topic, BK has a new 4.3.1 Puppy released - advertised to have Hiawatha, BUT file searching, all I can find is 2 HTML files, there is maybe a server in same directory named Quisp - He may have an error here, for he states in some web pages that he had some issues getting it finshed and up loaded, just a heads up - if you start to receive forum questions, because I don't find it in my - pup-431.iso download.

Thnks again,
Jay
efiguy
27 October 2009, 04:43
Hello Hugo,
I stand corrected on Puppy 4.3.1 as stated in prior post, Hiawatha is indeed Present and Operational in the 431 release. After spending time with menus, Pfind and process monitor I found the cgi tests within Quisp. The parts of 431 Hiawatha are in different places than the Puppywebserver 421 Hiawatha 6.14 .
There is an httpd.conf file and Hiawatha.conf file. I pulled 2 of the server setups from 6.14, (BTH I have all the security features present in httpd.conf both in general and virtual serv -- won't list tonight as too long)
and placed them into Hiawatha.conf, stopped and restarted EXE and low and behold Hiawatha was present in Process Monitor, A quick check with Seamonkey, and all three servers were operational. Thank You for such a fine piece of programing.
Jay


Hiawatha.conf parts and where they were inserted
BREAK
GarbageLogfile = /var/log/hiawatha/garbage.log

Binding {
Port = 80
Interface = 127.0.0.1
}

# VIRTUAL PORTS FOR BINDING
#
# SERVER ONE
Binding {
Port = 4170
Interface = 192.168.1.133
BindingID = use4170
}
#
# SERVER TWO
Binding {
Port = 4171
Interface = 192.168.1.133
BindingID = use4171
}
#

Hostname = 127.0.0.1
WebsiteRoot = /root/Web-Server
BREAK
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

# VIRTUAL SERVER ONE
VirtualHost {
Hostname = 192.168.1.133
RequiredBinding = use4170
WebsiteRoot = /mnt/sda4/usr/myhtmsavs/testhtm
StartFile = index.html
}

# VIRTUAL SERVER TWO
VirtualHost {
Hostname = 192.168.1.133
RequiredBinding = use4171
WebsiteRoot = /mnt/sda2/webs/web_1/files/html
StartFile = index.html
# VolatileObject = /var/www/webcam.gif
#
}

efiguy
11 November 2009, 17:41
Hello Hugo,

My intrAnet trials have been very successful with Hiawatha. I use simple html pages of family vacations consisting of 36 12kb thumbnails, that call the main file +10mb jpg and some heirlom scanned photos of +30 mb tif files. I experimented with default timing because of older PC hardware and the resulting delays. In the interest of helping others include the simplified configs and a Hiawatha start & stop control for Puppy431. Because of (little or none) expected overlap of any virtual server time of use - the Max ip number increase really improved performance.
Thank you very much Hugo, we will be contributing

# GENERAL SETTINGS SERVER CONFIGURATION
# **********************************
# *** PATH AND COMMAND FILES WITH SERVER CONFIGURATION INTERACTION ***
# PATH and FIREWALL DATA INFO
# /mnt/home/etc/hiawatha *Config files
# /mnt/home/etc/rc.d/rc.firewall *CONTROL CHANGES 10-29-09
# PERMIT="80/tcp 443/tcp 2150-2153/tcp 2249-2252/tcp 2262-2267/tcp 2361-2367/tcp 4170-4180/tcp 54170-54180/tcp"
# # RFC_1122_COMPLIANT="yes" *YES Not recommended for stealth allows some reply
# RFC_1122_COMPLIANT="no"
# DROP_NEW_WITHOUT_SYN="yes"
# # DROP_NEW_WITHOUT_SYN="no" *yes Stops ping responses so that it is more hidden
# /mnt/home/usr/sbin/ *hiawatha exes firewall wigwam
# END PATH DATA
# ************************************
# PATH DATA INFO
# /mnt/home/etc/hiawatha Config files
# /mnt/home/etc/rc.d/rc.firewall Control
# /mnt/home/usr/sbin/ hiawatha exes firewall wigwam
# END PATH DATA
# ************************
# AllowedCiphers = <cipher>[:<cipher>,...]
# ****** BANS ******
# BanlistMask = (allow|deny) <ip-address>[/netmask][, (allow|deny) <ip-address>[/netmask], ...]
# BanOnCMDi = <ban-time>
BanOnCMDi = 60
# BanOnFlooding = <number>/<time>:<ban-time>
BanOnFlooding = 10/1:15
# BanOnGarbage = <ban-time>
BanOnGarbage = 60
# BanOnMaxPerIP = <ban-time>
BanOnMaxPerIP = 11
# BanOnMaxReqSize = <ban-time>
# Default = 0, example: BanOnMaxReqSize = 10
BanOnMaxReqSize = 10
# BanOnSQLi = <ban-time>
BanOnSQLi = 60
# BanOnTimeout = <ban-time>
BanOnTimeout = 30
# BanOnWrongPassword = <number>:<ban-time>
# KickOnBan = yes|no
KickOnBan = yes
#
# END BANS
# *****
# MEMORY MANAGEMENT
# CacheSize = <size in megabytes> MAX 50
CacheSize = 50
# CacheMinFilesize = <size in bytes>
# CacheMaxFilesize = 128 default 256
# CacheMaxFilesize = <size in kilobytes>
CacheMaxFilesize = 32768
# END MEMORY MANAGEMENT
# CGIextension = <extension>[, <extension>, ...]
# CGIhandler = <CGI handler>:<extension>[, <extension>, ...]
# CGIwrapper = <CGI wrapper>
# CommandChannel = <portnumber>, <MD5 hash of password>
# ConnectionsPerIP = <number>
# PERFORMANCE 1 No thumbs big pic OK, 15 had 14 thumb, 30 allowed all thumbs
# 20 kicked ban and shut off, 25 had allthumbs
# 2,4,8,16,32,64,128,256
ConnectionsPerIP = 32
# ConnectionsTotal = <number> x*5=160
ConnectionsTotal = 160
# DHparameters = <DH paramater file>
# GarbageLogfile = <filename with full path>
# Include <filename>|<directory>
# KickOnBan = yes|no
# KickOnBan = yes
# KillTimedoutCGI = yes|no
# LogfileMask = (allow|deny) <ip-address>[/netmask][, (allow|deny) <ip-address>[/netmask], ...]
# LogFormat = hiawatha|common|extended
# MimetypeConfig = <configurationfile>
# NoExtensionAs = <extension>
# PIDfile = <filename> CYGWIN
# RebanDuringBan = yes|no
# RebanDuringBan = yes
# ReconnectDelay = <time>
# ReconnectDelay = 3
# ServerId = webuser change 10-27-09
ServerId = nobody
# ServerRoot = <directory>
# ServerString = <text>
ServerString = none
# SocketSendTimeout = <time>
# SocketSendTimeout = 10
# SystemLogfile = <filename with full path>
SystemLogfile = /mnt/sdb6/Misc/hiawatha/system.log
GarbageLogfile = /mnt/sdb6/Misc/hiawatha/garbage.log
# Throttle = (<main-mimetype>/[<sub-mimetype>]|.<extension>):<speed in kB/s>
# UploadDirectory = <path>
# UserDirectory = <directory>
# WaitForCGI = yes|no
# WrapUserCGI = yes|no
#
# *********************
#
# END GENERAL SECURITY CONTROL SETTINGS
#
#
# ** START OF PORT ASSIGNMENT & CONTROL TOOLS **
#
# BASE DEFAULT SERVER LOCALHOST
#
# START **** Default port *****
Binding {
Port = 80
Interface = 192.168.1.133
# Interface = 127.0.0.1 change 10-27-09
# change 10-27-09
}
# **** END Default port ****
#
# **** VIRTUAL PORTS FOR BINDING ****
# *** BINDING CONFIGURATION COMMANDS ***
# MaxRequestSize = 256 try 1024 Maybe not here does not load Belongs to binding
# Default = 64, example: MaxRequestSize = 256
# Default = 0, example: BanOnMaxReqSize = 10
# **************
# BindingId = <binding_id> Unique Name
# EnableAlter = yes|no
# EnableTRACE = yes|no
# Default = no, example: EnableTRACE = yes
# Interface = <ip-address>
# MaxKeepAlive = <number> Default = 50
# MaxRequestSize = <size> Default = 64
# Default = 64, example: MaxRequestSize = 256 1024etc
# MaxUploadSize = <size> Max 100 Mb
# Port = <portnumber>
# RequiredCA = <CA certificate file>[, <verify depth>]
# SSLcertFile = <SSL private key and certificate file>
# SSLcertFile = <SSL private key and certificate file>
# TimeForRequest = [<time1>, ]<time2> Default 5, 30
# TimeForRequest = 10, 45 x,x * 8= For my pages
# *****************
#
# VIRTUAL PORTS * SERVER ONE
Binding {
Port = 4171
Interface = 192.168.1.133
BindingID = use4171
# MaxRequestSize = 10 Default 64 # 1024
MaxRequestSize = 256
TimeForRequest = 40, 240
MaxKeepAlive = 400
}
#
# VIRTUAL PORTS * SERVER TWO
Binding {
Port = 4172
Interface = 192.168.1.133
BindingID = use4172
# MaxRequestSize = 10 Default 64 # 1024
MaxRequestSize = 256
TimeForRequest = 40, 240
MaxKeepAlive = 400
}
#
#
# END PORT CONTROL
#
# REAL DEFAULT SERVER DEFAULT BASE SERVER (PORT 80) Blanked Index
#
# Hostname = 127.0.0.1 change 10-27-09
Hostname = localhost
WebsiteRoot = /mnt/sdb6/Misc/h______xtra
StartFile = index.html
# change 10-27-09
EnablePathInfo = no
ExecuteCGI = no
FollowSymlinks = no
PreventCMDi = yes
PreventSQLi = yes
PreventCSRF = yes
PreventXSS = yes
SecureURL = no
# UserWebsites = yes
# ExecuteCGI = yes
# TimeForCGI = 5
accessLogfile = /mnt/sdb6/Misc/hiawatha/access80.log
ErrorLogfile = /mnt/sdb6/Misc/hiawatha/error80.log
#
#
# change 10-27-09
#add this stuff to get a perl script working (pplog)...
#QUISP has a binary executable CGI named 'quisp.bin'...
# MimetypeConfig = /etc/mime.types change 10-27-09
# CGIhandler = /usr/bin/perl:pl change 10-27-09
# CGIextension = pl,bin change 10-27-09
# ExecuteCGI = yes change 10-27-09
#QUISP puts %0D, %0A (carriage-return, line-feed) chars in the url
#(v128), to allow chars below ascii 32 need this...
#
#
# VIRTUAL HOSTS CONFIGURATION
# Use a VirtualHost section to declare the websites you want to host.
#
# VIRTUAL SERVER ONE Projects A
VirtualHost {
Hostname = 192.168.1.133
RequiredBinding = use4171
WebsiteRoot = /mnt/sdb6/webs/web_1/files/html
StartFile = index.html
# ShowIndex = no
ErrorHandler = 404:/mnt/sdb6/Misc/htmlextra/prob404.html
# DenyBot = msnbot:/files
EnablePathInfo = no
ExecuteCGI = no
FollowSymlinks = no
PreventCMDi = yes
PreventSQLi = yes
PreventCSRF = yes
PreventXSS = yes
AccessLogfile = /mnt/sdb6/Misc/access_S1.log
ErrorLogfile = /mnt/sdb6/Misc/error_S1.log
}
#
# VIRTUAL SERVER TWO Projects B
VirtualHost {
Hostname = 192.168.1.133
RequiredBinding = use4172
WebsiteRoot = /mnt/sdb6/webs/web_2/files/html
StartFile = index.html
# ShowIndex = no
ErrorHandler = 404:/mnt/sdb6/Misc/htmlextra/prob404.html
# DenyBot = msnbot:/files
EnablePathInfo = no
ExecuteCGI = no
FollowSymlinks = no
PreventCMDi = yes
PreventSQLi = yes
PreventCSRF = yes
PreventXSS = yes
AccessLogfile = /mnt/sdb6/Misc/access_S2.log
ErrorLogfile = /mnt/sdb6/Misc/error_S2.log
# VolatileObject = /var/www/webcam.gif *** ADD LOGS change 10-27-09
}
#
#
# END VIRTUAL HOSTS CONFIGURATION
#

Start and Stop Base HTML Hiawatha server

#!/bin/bash
#
# FUNCTIONING CONTROL BUTTONS FOR A BASE (NON-CGI-SQL)
# HIAWATHA WEBSERVER ISO_431 large version
# Hiawatha start/stop script for Linux (MODIFIED 10-31-09 jj)
#
PATH="/bin:/usr/bin:/sbin:/usr/sbin"
HIAWATHA="/usr/sbin/hiawatha"
WIGWAM="/usr/sbin/wigwam"
PIDFILE="/var/run/hiawatha.pid"

NORMAL="\033[0m"
RED="\033[00;31m"
YELLOW="\033[00;33m"
GREEN="\033[00;32m"

PSSTATUS="`ps`"


xmessage -center -bg 'orange' -buttons HIAWATHA:9,STOP:10,EXIT:11 -title "box" "
Click the 'Hiawatha' button to START web interface.

If you want to stop the server and exit, click the 'STOP' button

# To just quit, click the 'EXIT' button"

case $? in

9)
exec /usr/sbin/hiawatha
exit
;;
10)
hiawatha stop
# hia_wath.run stop
hiawatha.run stop
# hia_wath stop
exit
;;
*)
exit
;;

esac
exit 0
###END###
This topic has been closed.