PDA

Bekijk de volledige versie : HTTPD questions...



jlangston
17-08-2006, 01:58
OK, I agree that I am a clueless noob (well, I know enough to be dangerous :D ), so here goes.

I would like to be able to have the built-in HTTPD server serve up content that is on the USB stick. The stick mounts fine at boot-time and is mounted at /tmp/harddisk, and I can view the contents. So far so good.

Attempt 1: Create a symlink to the stick in the existing /www directory, so I can surf to x.x.x.x/stuff/index.htm or something like that.
- This doesn't work, as the /www directory is read-only, so my "ln -s /tmp/harddisk stuff" fails.

Attempt 2: Create an httpd.conf in the /etc directory, and save it to flash
- The file is there, but httpd doesn't 'see' it. Killing httpd and restarting it with "httpd -c /etc/httpd.conf" doesn't work either, or at least it won't see the pages on the USB stick.

Attempt 3: Try the command-line options for the home directory
- Killing httpd and restarting with "httpd -h /tmp/harddisk" or "httpd -h /tmp/harddisk/www" both fail...

Anywhoo, has anyone managed to get this to work? Ideally I'd like to be able to serve up content from the USB or the internal drive, and if needed I could move the admin pages to another port... but since I can't seem to control the built-in httpd at this point, I'm not sure how to accomplish that.

Any help would be most appreciated...

Thanks,
Jim

martin72
17-08-2006, 16:37
OK, I agree that I am a clueless noob (well, I know enough to be dangerous :D ), so here goes.

I would like to be able to have the built-in HTTPD server serve up content that is on the USB stick. The stick mounts fine at boot-time and is mounted at /tmp/harddisk, and I can view the contents. So far so good.

Attempt 1: Create a symlink to the stick in the existing /www directory, so I can surf to x.x.x.x/stuff/index.htm or something like that.
- This doesn't work, as the /www directory is read-only, so my "ln -s /tmp/harddisk stuff" fails.

Attempt 2: Create an httpd.conf in the /etc directory, and save it to flash
- The file is there, but httpd doesn't 'see' it. Killing httpd and restarting it with "httpd -c /etc/httpd.conf" doesn't work either, or at least it won't see the pages on the USB stick.

Attempt 3: Try the command-line options for the home directory
- Killing httpd and restarting with "httpd -h /tmp/harddisk" or "httpd -h /tmp/harddisk/www" both fail...

Anywhoo, has anyone managed to get this to work? Ideally I'd like to be able to serve up content from the USB or the internal drive, and if needed I could move the admin pages to another port... but since I can't seem to control the built-in httpd at this point, I'm not sure how to accomplish that.

Any help would be most appreciated...

Thanks,
Jim

Why should you try this? If you'd like to publish the stuff on the WAN side, it means that everyone has access to the port the router itself is on.
Instead, install the Oleg firmware and install thttpd. Soms small problems with stability have yet to be overcome, but on the whole it works great. Browse through this forum and macsat.com and you'll find all you need to accomplish this.
If you don't like thttpd after all, there are also a few other suggestions on this forum.

BR,

Martin