• February 26, 2025, 03:21:22 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

This Forum Beta is ONLY for registered owners of D-Link products in the USA for which we have created boards at this time.

Author Topic: Lighttpd paths  (Read 5807 times)

tnsage

  • Level 1 Member
  • *
  • Posts: 13
Lighttpd paths
« on: December 16, 2010, 05:38:28 AM »

Once more I plague this site and ask for help
I do realise that I have managed to fix my previous 2 posts myself, but this time I have tried and do not want to screw up my box

I have Lighttpd running fine and dandy on Port 8080, I may change it to 80 later on.

I want to add some paths to the web server

for instance ***.***.*.** is my IP address
***.***.*.**:8080/Installs to reach my installs packages, with read only perms, or read write.

I guess it is simple, but I am unsure

Regards

Tim

Loving this little black box
Logged

HSishi

  • Level 2 Member
  • **
  • Posts: 73
Re: Lighttpd paths
« Reply #1 on: December 16, 2010, 07:31:12 AM »

The keyword is "alias". Use this in the lighttpd.conf and you can route any folder of the NAS into your webserver.

But - for the sake of access and r/w protection, you might need username and PW protection. For that, check google for ".htaccess".

//HSishi
« Last Edit: December 16, 2010, 07:42:03 AM by HSishi »
Logged

tnsage

  • Level 1 Member
  • *
  • Posts: 13
Re: Lighttpd paths
« Reply #2 on: December 16, 2010, 08:03:25 AM »

I can not find an "alias" section in my config file.

Also I have looked on several sites, and the usages of alias are simply gobledygook

do I need to create a section called "alias
Another site says I have to have a mod_alias added to the mods section.

I am reluctant to mess around with advice that seems vague as I do not want to crash my little box

My web root structure is this
server.document-root        = "/mnt/HD_a2/WWW/pages/"

I want to add
what should go here = "/mnt/HD_a2/WWW/pages/Installs"

Using ftp the actual location is installs is /Volume_1/Share/Installs

I map this as S: at the mo but want to loose the map in preference of the web server

Love Unix, but IIs is a doddle

Tim



Logged

dosborne

  • Level 5 Member
  • *****
  • Posts: 598
Re: Lighttpd paths
« Reply #3 on: December 16, 2010, 11:08:40 AM »

Not too sure what you are trying to do, but any subdiretories that you create in the www root location will be accessible on the URL.

So, if you create a path "/mnt/HD_a2/WWW/pages/Installs" and put files in there, it should be [ip address]:8080/installs/[filename]

However, it sounds like you actually want to to point to a different location. You could create a shortcut in /mnt/HD_a2/WWW/pages called "installs" that points to /mnt/HD_a2/Share/Installs (?)


Alternatively, you can create an alias to do the same thing
alias.url = ( "/installs/" => "/mnt/HD_a2/Share/Installs /" )
« Last Edit: December 16, 2010, 11:12:55 AM by dosborne »
Logged
3 x DNS-323 with 2 x 2TB WD Drives each for a total of 12 TB Storage and Backup. Running DLink Firmware v1.08 and Fonz Fun Plug (FFP) v0.5 for improved software support.

tnsage

  • Level 1 Member
  • *
  • Posts: 13
Re: Lighttpd paths
« Reply #4 on: December 16, 2010, 12:00:04 PM »

OK I copied
alias.url = ( "/installs/" => "/mnt/HD_a2/Share/Installs /" )

exactly as you typed it
I put it 1 line below server.document-root in the lighttpd.conf file

when I type in the address to the box http://storage:8080/installs/

Google Chrome gives me an oops page not found

where am I going wrong, are there some lines I need to un-comment to activate this

Regards

Tim
Logged

dosborne

  • Level 5 Member
  • *****
  • Posts: 598
Re: Lighttpd paths
« Reply #5 on: December 16, 2010, 12:56:58 PM »

Do you have any files in that directory? index.html for example? Try specifying a file name.
Logged
3 x DNS-323 with 2 x 2TB WD Drives each for a total of 12 TB Storage and Backup. Running DLink Firmware v1.08 and Fonz Fun Plug (FFP) v0.5 for improved software support.

tnsage

  • Level 1 Member
  • *
  • Posts: 13
Re: Lighttpd paths
« Reply #6 on: December 16, 2010, 01:01:06 PM »

Directory browsing is on by default, and there are 20 gigs of files

Regards

Tim

Confused.com
Logged

HSishi

  • Level 2 Member
  • **
  • Posts: 73
Re: Lighttpd paths
« Reply #7 on: December 16, 2010, 01:26:39 PM »

You must also activate the "alias" module in the lighttpd.conf file. Check the "server modules" list for a line
Quote
#                               "mod_alias",
and remove the "#".

After this, you can add several lines like the form
Quote
alias.url = ( "/sharename/" => "/path/" )
for example
Quote
alias.url = ( "/music/" => "/mnt/HD_b2/home/media/" )
would make the folder "/home/media/ on the HD in the left (!) bay accessible via
http://[adress]/music

After you have done all modifications to the lighttpd.conf, you need to restart the lighttpd:
Code: [Select]
cd /ffp/start
sh lighttpd.sh restart

//HSishi
Logged

tnsage

  • Level 1 Member
  • *
  • Posts: 13
Re: Lighttpd paths
« Reply #8 on: December 16, 2010, 03:44:57 PM »

Thanks a million

Looks like what I am looking for.

Will try this in the morning and let you know.

Regards

Tim
Logged

tnsage

  • Level 1 Member
  • *
  • Posts: 13
Re: Lighttpd paths
« Reply #9 on: December 17, 2010, 03:59:03 AM »

Woooooooo HOOOOOOOOOooooooooooooo

Guess I am a sado, but these things make me a happy bunny

All working now

Regards

Tim
 ;D ;D ;D ;D ;D ;D ;D ;D
Logged