LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-12-2009, 11:59 AM   #1
mrgreaper
Member
 
Registered: May 2006
Posts: 167

Rep: Reputation: 15
dynamic website possible?


ok i have used ubuntu on and off for about a year however i still consider myself a newb. now im off to malta in august and im using a program called motion to record movement in my flat (more for peace of mind then anything else) now the motion programme puts jpg files into a folder in the home folder (/home/username/motion/) and it uses root as permision (i believe).

now what i would like is a web page that creates a html page showing the jpgs from the folder but with password access.

i do have apache installed and i can see the test page

is it possible?

Last edited by Tinkster; 05-12-2009 at 08:11 PM.
 
Old 05-12-2009, 12:06 PM   #2
sarin
Member
 
Registered: May 2001
Location: India, Kerala, Thrissur
Distribution: FC 7-10
Posts: 354
Blog Entries: 2

Rep: Reputation: 34
You can do that. But have a look at http://www.zoneminder.com/. This might be what you want.
 
Old 05-12-2009, 08:01 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,241

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325
If you decide to do the Apache thing, you'll need a .htaccess file in that dir
Code:
# sample authentication .htaccess file
AuthName       "Bob's Secret Stuff"
AuthType       basic
AuthUserFile   /home/bob/.htpasswd
require user   bob
Create .htpasswd file
Code:
htpasswd -cm /etc/httpd/.htpasswd bob
will prompt for a passwd. Use the same cmd sans the '-c' switch to change the passwd.

You'll need to activate that in the main httpd.conf
Code:
AllowOverride AuthConfig
See also the UserDir section in httpd.conf
 
Old 05-12-2009, 08:07 PM   #4
soleilarw
Member
 
Registered: Apr 2009
Posts: 107

Rep: Reputation: 19
Use an .htaccess file to protect your web directory, use htpasswd to create the password for it. With .htaccess in place the web browser itself will request authentication without additional programming. You need to read related Apache documentation for the details.

If your JPG files are named with a certain pattern (for example date + counter + extension, like 2009-05-13_0001.jpg), then you can access images directly. As a matter of fact, if your Apache installation is set to allow directory listings for directories without index files (no index.html), then you will not need a web page, because Apache will generate the directory listing automatically.

With proper configuration you will not need any scripting at all.

Linux Archive

Last edited by soleilarw; 06-18-2009 at 04:45 AM.
 
Old 05-12-2009, 08:47 PM   #5
mrgreaper
Member
 
Registered: May 2006
Posts: 167

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by soleilarw View Post
Use an .htaccess file to protect your web directory, use htpasswd to create the password for it. With .htaccess in place the web browser itself will request authentication without additional programming. You need to read related Apache documentation for the details.

If your JPG files are named with a certain pattern (for example date + counter + extension, like 2009-05-13_0001.jpg), then you can access images directly. As a matter of fact, if your Apache installation is set to allow directory listings for directories without index files (no index.html), then you will not need a web page, because Apache will generate the directory listing automatically.

With proper configuration you will not need any scripting at all.
so all i would need to do is create a symbolic link between the motion folder and a folder in www add the .htaccess file and its done!?!

linux never ceases to amaze me, thank you ! i will also look up zoneminder

***quick edit***
just read the zoneminders main page ....wow i espicialy like the bit about xhtml for compatable phones!

sadly zoneminder just refuses to show video see here http://www.zoneminder.com/forums/vie...?p=52652#52652 for the problem (hopefully some kind soul on zone minder forum will reply and fix it for me (if you have a read youll see i have exhusted all options i can think of

i instructed motion to save its images to a folder in the www folder and i can indeed view them in a list (my phone downloads them then allws viewing so not ideal but certainly workable) i have a tutorial on apche login methods bookmarked and will read when i get a second to my self (been hectic trying to sort out that zone minder (man that would of been perfect)

Last edited by mrgreaper; 05-13-2009 at 09:48 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
viewing an externally hosted website from within a given website andrews-mark Linux - Server 6 10-07-2008 01:11 AM
regarding dynamic website rh-penguin Linux - Server 6 10-10-2006 10:48 AM
Dynamic name resolution for dynamic IP merlin740 Linux - Software 2 10-04-2004 06:56 PM
Dynamic IP? Gerardoj Linux - Networking 5 05-27-2003 03:20 PM


All times are GMT -5. The time now is 06:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration