VectorLinux
July 31, 2014, 05:25:08 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: thttpd  (Read 7286 times)
jwp1
Member
*
Posts: 12


« on: July 13, 2007, 11:30:28 am »

Hi band new Vector user.  (I will stay on it for real this time)
I am a normal apache person with a bit of suse and fedora exp.

I installed thttpd.
typed thttpd and it showed me the root home directory
I changed the config file to /home/www

Rebooted and typed thttpd and now it does not work.
I changed the permissions to allow user and others to read the directory but not right to it.

Has anyone set up thttpd? I read the web stuff but it is setup bsd.

Also I have a hunch that firewall might have turned back on after reboot.  I turned it off so I could get ping.

Also is there a way to set up an FTP into the /home/www directory?

Regards

JWP
Logged
M0E-lnx
Administrator
Vectorian
*****
Posts: 3178



« Reply #1 on: July 13, 2007, 12:09:40 pm »

what exactly do you mean by "it does not work"

how about posting an error message or something?
Logged

newt
Vectorian
****
Posts: 1132



« Reply #2 on: July 13, 2007, 12:58:58 pm »

Perhaps it's a permissions problem with your directories/files... I caught this little bit looking through the docs for thttpd:
Quote
In summary, data files should be mode 644 (rw-r--r--), directories should be 755 (rwxr-xr-x) if you want to allow indexing and 711 (rwx--x--x) to disallow it, and CGI programs should be mode 755 (rwxr-xr-x) or 711 (rwx--x--x).

You may also want to look into the ownership of the new www directory and make sure it's similar to the default ownership.

HTH,
newt
Logged
Joe1962
Administrator
Vectorian
*****
Posts: 2499



WWW
« Reply #3 on: July 13, 2007, 03:40:58 pm »

First question should have been: how did you install thttpd?
Logged

O'Neill (RE the Asgard): "Usually they ask nicely before they ignore us and do what they damn well please."
http://joe1962.bigbox.info
Running: VL 7 Std 64 + self-cooked XFCE-4.10
jwp1
Member
*
Posts: 12


« Reply #4 on: July 16, 2007, 04:30:05 am »

yes, I installed thttpd, through gslapt as Root.
It seems that every time I reboot the computer I have to go through VASM and pick which network setting I need or type in all the network settings.

It keeps using the root home directory and will not let users down load files by right clicking.

Logged
Joe1962
Administrator
Vectorian
*****
Posts: 2499



WWW
« Reply #5 on: July 16, 2007, 06:16:06 am »

Unless somebody did a new thttpd packet, that would be mine. It installs a thttpd.conf to /etc that sets the default directory to /var/www/html/. It also sets the logfile to /var/log/thttpd.log and the pidfile to /var/run/thttpd.pid.
 For thttpd to use that config file, the package also installs a service script (/etc/rc.d/init.d/thttpd), so you use the normal service commands:
Code:
service thttpd start
service thttpd stop
service thttpd restart
service thttpd status
Or just set it up to start the service in the proper runlevel through vasm.
Logged

O'Neill (RE the Asgard): "Usually they ask nicely before they ignore us and do what they damn well please."
http://joe1962.bigbox.info
Running: VL 7 Std 64 + self-cooked XFCE-4.10
M0E-lnx
Administrator
Vectorian
*****
Posts: 3178



« Reply #6 on: July 16, 2007, 06:24:10 am »

I think he messed with the config file... so that may need to be restored to default
Logged

Joe1962
Administrator
Vectorian
*****
Posts: 2499



WWW
« Reply #7 on: July 16, 2007, 06:36:34 am »

No, the problem is that running "thttpd" doesn't work, you need to explicitly tell it to use a certain config file with -C. This is already done in the service script.
Logged

O'Neill (RE the Asgard): "Usually they ask nicely before they ignore us and do what they damn well please."
http://joe1962.bigbox.info
Running: VL 7 Std 64 + self-cooked XFCE-4.10
jwp1
Member
*
Posts: 12


« Reply #8 on: July 16, 2007, 07:02:59 am »

hi again,
I still have the network problem when I reboot.
But I changed a few of the sound card settings and it does not have mixer find issues anymore.

Ok to start it type thttpd -C /ect/thttpd.conf
It still does not go to the directory I want with this config file.

# This section overrides defaults
dir=/home/wwww
#chroot
#data_dir=/home/www
user=nobody
logfile=/var/log/thttpd.log
pidfile=/var/run/thttpd.pid

# This section _documents_ defaults in effect
# port=80
# nosymlink# default = !chroot
# novhost
# nocgipat
# nothrottles
# host=0.0.0.0
# charset=iso-8859-1

Thanks

John
Logged
newt
Vectorian
****
Posts: 1132



« Reply #9 on: July 16, 2007, 07:48:55 am »

I noticed you posted "dir=/home/wwww"... I think that's one more 'w' that you want.  Perhaps it's just a typo in your post and not actually what's reflected in your conf file.  However, if you pasted from your conf file then that could be the culprit.
Logged
jwp1
Member
*
Posts: 12


« Reply #10 on: July 18, 2007, 01:10:34 am »

Hi all of the service commands worked except status.
/etc/rc.d/init.d/thttpd:  Line 39:status: command not found


Unless somebody did a new thttpd packet, that would be mine. It installs a thttpd.conf to /etc that sets the default directory to /var/www/html/. It also sets the logfile to /var/log/thttpd.log and the pidfile to /var/run/thttpd.pid.
 For thttpd to use that config file, the package also installs a service script (/etc/rc.d/init.d/thttpd), so you use the normal service commands:
Code:
service thttpd start
service thttpd stop
service thttpd restart
service thttpd status
Or just set it up to start the service in the proper runlevel through vasm.

Logged
jwp1
Member
*
Posts: 12


« Reply #11 on: July 18, 2007, 01:19:07 am »

Great guys it was the extra w in the config file.
It is serving the html and allowing xls files to be down loaded well.
Logged
M0E-lnx
Administrator
Vectorian
*****
Posts: 3178



« Reply #12 on: July 18, 2007, 05:19:00 am »

Is there anyway to make this thing follow symlinks?

IE, if I have a symlink in my /home/www dir, then when I click on it on the page, it gives me a 403 error

_EDIT_

Never Mind, I figured it out...
Turns out the config wording is somewhat confusing... you have to enable the
"nosymlink" option to make it follow symlinks outside of it's root dir. Sort of  confusing IMO, but it does the trick
« Last Edit: July 18, 2007, 05:36:00 am by M0E-lnx » Logged

Joe1962
Administrator
Vectorian
*****
Posts: 2499



WWW
« Reply #13 on: July 18, 2007, 08:44:08 am »

Hi all of the service commands worked except status.
/etc/rc.d/init.d/thttpd:  Line 39:status: command not found

You're right. It calls "status thttpd". The "status" command is probably from some well known distro or other, most likely Red Hat. Didn't check that when I adapted the example service script.
Logged

O'Neill (RE the Asgard): "Usually they ask nicely before they ignore us and do what they damn well please."
http://joe1962.bigbox.info
Running: VL 7 Std 64 + self-cooked XFCE-4.10
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!