ghttpd web server problem
ghttpd web server problem
My introduction:
Hi everyone, this is my first post at puppy forums. I downloaded and installed puppy yesterday, on a 10 year old computer. I want to host websites through it - I was hosting sites using apache in windows98 from it, but I wanted to get rid of windows, so I have installed puppy.
My problem:
I have installed puppy on hard drive, loaded the driver for ethernet card (DLink DFE 530TX + Rev F), got on to the internet - all fine so far. Now I click on "httpd" executable file (looks like a cogwheel) and the web server starts. I type "localhost" in seamonkey browser, and it shows me the homepage for that server. However, I cannot access that website from any of the other computers on the network for internal testing purposes, nor I can access the website using IP address from outside my network despite opening port 80 in my router.
What I want:
First, I want to be able to see that website running on puppy from other computers on my network (one windowsXP and a Mac OS-X computer) so that I can test it on my local network. Once I'm satisfied, I shall open the site to the internet by opening port 80 in my router.
Please help me in accessing my website on puppy from other computers on the local network.
Thanks
Hi everyone, this is my first post at puppy forums. I downloaded and installed puppy yesterday, on a 10 year old computer. I want to host websites through it - I was hosting sites using apache in windows98 from it, but I wanted to get rid of windows, so I have installed puppy.
My problem:
I have installed puppy on hard drive, loaded the driver for ethernet card (DLink DFE 530TX + Rev F), got on to the internet - all fine so far. Now I click on "httpd" executable file (looks like a cogwheel) and the web server starts. I type "localhost" in seamonkey browser, and it shows me the homepage for that server. However, I cannot access that website from any of the other computers on the network for internal testing purposes, nor I can access the website using IP address from outside my network despite opening port 80 in my router.
What I want:
First, I want to be able to see that website running on puppy from other computers on my network (one windowsXP and a Mac OS-X computer) so that I can test it on my local network. Once I'm satisfied, I shall open the site to the internet by opening port 80 in my router.
Please help me in accessing my website on puppy from other computers on the local network.
Thanks
you probably just have to configure the firewall script to allow incoming connections to port 80
just open /etc/rc.d/rc.firewall or whatever firewall script is being used in a text editor
you can shutdown the firewall for testing purposes (it's relatively safe to run Puppy without a firewall) by typing
/etc/rc.d/rc.firewall stop
assuming it was configured to use your internet connection
just open /etc/rc.d/rc.firewall or whatever firewall script is being used in a text editor
you can shutdown the firewall for testing purposes (it's relatively safe to run Puppy without a firewall) by typing
/etc/rc.d/rc.firewall stop
assuming it was configured to use your internet connection
I have shut down the firewall now using the command you gave, and rxvt says firewall is now stopped. Still, I can't access the local webserver on any of the machines on the local network. I checked the firewall configuration, and I'm pasting few lines below:GuestToo wrote:you probably just have to configure the firewall script to allow incoming connections to port 80
just open /etc/rc.d/rc.firewall or whatever firewall script is being used in a text editor
you can shutdown the firewall for testing purposes (it's relatively safe to run Puppy without a firewall) by typing
/etc/rc.d/rc.firewall stop
assuming it was configured to use your internet connection
PERMIT="80"
INTERNAL_INTERFACES=""
DENY_OUTBOUND=""
ALLOW_INBOUND=""
BLACKLIST=""
STATIC_INSIDE_OUTSIDE=""
PORT_FORWARDS=""
PORT_FWD_ALL="yes"
PORT_FWD_ROUTED_NETWORKS="yes"
ADDITIONAL_ROUTED_NETWORKS=""
TRUST_ROUTED_NETWORKS="yes"
SHARED_INTERNAL="yes"
FIREWALL_IP=""
TRUST_LOCAL_EXTERNAL_NETWORKS="no"
DMZ_INTERFACES=""
NAT_EXTERNAL="yes"
ADDITIONAL_NAT_INTERFACES=""
IGNORE_INTERFACES=""
LOGGING="no"
REQUIRE_EXTERNAL_CONFIG="no"
NO_RP_FILTER_INTERFACES=""
INTERNAL_DHCP="yes"
RFC_1122_COMPLIANT="yes"
DROP_NEW_WITHOUT_SYN="no"
DUMP_TCP_ON_INIT="no"
TTL_STEALTH_ROUTER="no"
Any idea where the problem lies? And even if I have some problem in firewall config, I have disabled the firewall so webserver should work... but I can see the "localhost" site only on the puppy machine, not on any other
Re: conf
Well, my external IP is assigned by router via DHCP almost every day. Should I update the IP in the config file manually? Or are you talking about the "internal" / local IP which stays the same?raffy wrote:There's a conf file beside httpd, where you enter the IP address of yout PC.
Here's my httpd.cfg:
SERVER_BASE_DIR = "/root/ghttpd"
SERVER_BIN_DIR = "/root/ghttpd"
SERVER_CGI_DIR = "/root/ghttpd/cgi-bin"
SERVER_ETC_DIR = "/root/ghttpd"
SERVER_HTTP_DIR = "/root/ghttpd/htdocs"
SERVER_LOGLEVEL = "1"
SERVER_HOSTNAME = "localhost"
SERVER_PORT = "80"
SERVER_MAXCONN = "50"
SERVER_MAXIDLE = "120"
- Nathan F
- Posts: 1764
- Joined: Wed 08 Jun 2005, 14:45
- Location: Wadsworth, OH (occasionally home)
- Contact:
You will need a static IP, both over the internet and within your home network. Most routers will allow you to assign an IP manually if you need to, I have my server set to 192.168.1.100 permanently but the other computers are assigned IP's by the dhcp server of my router.
I think you will need to set the variable SERVER_HOSTNAME to your IP (not sure). Actually if you are doing anything more than just serving pages from within a private home network I would recommend something a bit more heavy duty than ghttpd.
Nathan
I think you will need to set the variable SERVER_HOSTNAME to your IP (not sure). Actually if you are doing anything more than just serving pages from within a private home network I would recommend something a bit more heavy duty than ghttpd.
Nathan
Bring on the locusts ...
I set SERVER_HOSTNAME to "localhost, 127.0.0.1, 192.168.1.75" where the last entry is my fixed local IP. Still, I'm not able to access the site on puppy computer through other computers on the network (firewall is disabled on puppy).Nathan F wrote:I think you will need to set the variable SERVER_HOSTNAME to your IP (not sure).
Apache?Nathan F wrote:Actually if you are doing anything more than just serving pages from within a private home network I would recommend something a bit more heavy duty than ghttpd.
any
The last known entry to SERVER_HOSTNAME that works with any IP of the host PC was "any", working for "localhost" as well as an IP address. I don't know exactly why it was changed.
Puppy user since Oct 2004. Want FreeOffice? [url=http://puppylinux.info/topic/freeoffice-2012-sfs]Get the sfs (English only)[/url].
Re: any
Could that be some security reason?raffy wrote:The last known entry to SERVER_HOSTNAME that works with any IP of the host PC was "any", working for "localhost" as well as an IP address. I don't know exactly why it was changed.
I've reserved five hours today evening for fixing up ghttpd server... if I can't get it to work, I'll try Ubuntu server install. I have never used linux in pure CLI, but looks like today may just be the beginning!
Server_hostname = "any" - does this lower security
Okay... will try that when I reach my apartment. Thanks for the hint.GuestToo wrote:i think all you will need to do is to change
SERVER_HOSTNAME = "localhost"
to
SERVER_HOSTNAME = "any"
in the file /root/ghttpd/httpd.cfg
By the way, does this method have some security implications? (I moved away from win98 because of security reasons - my box was owned and it was spreading spam... and I was unable to block port 25 on windows98).
And, what about installing Apache? Does this work well under puppy?
SERVER_HOSTNAME = "any" would let any machine on your network or on the internet connect to your server. This is probably what you want if you want to run a web server. "any" was always the default configuration, i don't know when it changed
ok, i found this thread:
http://www.murga.org/~puppy/viewtopic.php?t=6695
setting SERVER_HOSTNAME = "localhost" will prevent anyone from acccessing the web server ... i don't know why that would be a desirable thing ... anyway, apparently there's at least one version of Puppy with this configuration as the default
it's usually a good thing to run a server as "spot" or as "nobody" rather than as "root"
that thread might make you think that anyone connecting to your server can see all the files on your computer ... this is true if you configure
SERVER_HTTP_DIR = "/"
but normally you would not do that ... the default should be something like
SERVER_HTTP_DIR = "/root/ghttpd/htdocs"
anyone connecting to your server should only see files in /root/ghttpd/htdocs and sub folders
by the way, you do not need to move /root/ghttp to run the server as spot or as nobody ... just chown the web files before starting the server
chown -R nobody:nobody /root/ghttpd/htdocs
also, Puppy uses Busybox for ps, so this is pointless:
ps -axwwu | grep httpd
Busybox's ps does not take arguments ... type ps --help
so this will do exactly the same thing:
ps | grep httpd
you can install Apache (or Xampp) if ghttp is not adequate and you want to run a complete and powerful web server
by the way, i made a roxapp-wrapper to start/stop htppd as root or as nobody ... i'm not sure if it still works with the newer versions of Puppy ... it's on my dotpups page ... search for "Rox Wrapper for Null httpd"
ok, i found this thread:
http://www.murga.org/~puppy/viewtopic.php?t=6695
setting SERVER_HOSTNAME = "localhost" will prevent anyone from acccessing the web server ... i don't know why that would be a desirable thing ... anyway, apparently there's at least one version of Puppy with this configuration as the default
it's usually a good thing to run a server as "spot" or as "nobody" rather than as "root"
that thread might make you think that anyone connecting to your server can see all the files on your computer ... this is true if you configure
SERVER_HTTP_DIR = "/"
but normally you would not do that ... the default should be something like
SERVER_HTTP_DIR = "/root/ghttpd/htdocs"
anyone connecting to your server should only see files in /root/ghttpd/htdocs and sub folders
by the way, you do not need to move /root/ghttp to run the server as spot or as nobody ... just chown the web files before starting the server
chown -R nobody:nobody /root/ghttpd/htdocs
also, Puppy uses Busybox for ps, so this is pointless:
ps -axwwu | grep httpd
Busybox's ps does not take arguments ... type ps --help
so this will do exactly the same thing:
ps | grep httpd
you can install Apache (or Xampp) if ghttp is not adequate and you want to run a complete and powerful web server
by the way, i made a roxapp-wrapper to start/stop htppd as root or as nobody ... i'm not sure if it still works with the newer versions of Puppy ... it's on my dotpups page ... search for "Rox Wrapper for Null httpd"
server_hostname = "any" doesn't work
I am at home now, in front of my puppy box. I had set server_hostname to "any", restarted the system, and disabled the firewall completely after it booted.
Now I can't see the website at all! Neither by typing localhost or 127.0.0.1, nor through other computers by typing in its local ip address.
I feel like installing apache... but if firewall is the problem, even apache would be useless.
Now I can't see the website at all! Neither by typing localhost or 127.0.0.1, nor through other computers by typing in its local ip address.
I feel like installing apache... but if firewall is the problem, even apache would be useless.
- bongmaster
- Posts: 50
- Joined: Sun 18 Dec 2005, 15:49
well, it won't work if you use lowercase .... Linux is case sensitiveserver_hostname = "any" doesn't work
my ghttp httpd.cfg file looks something like this:
# This file contains system settings for Null httpd.
SERVER_BASE_DIR = "/root/ghttpd"
SERVER_BIN_DIR = "/root/ghttpd"
SERVER_CGI_DIR = "/root/ghttpd/cgi-bin"
SERVER_ETC_DIR = "/root/ghttpd"
SERVER_HTTP_DIR = "/root/ghttpd/htdocs"
SERVER_LOGLEVEL = "2"
SERVER_HOSTNAME = "any"
SERVER_PORT = "80"
SERVER_MAXCONN = "50"
SERVER_MAXIDLE = "120"
you can stop the server by typing:
killall httpd
to restart the server with the new settings, you probably have to kill it first, then start it again