logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: How to host "Motion" webcam pics to Apache2
Author
jules



Joined: 12 Jun 2016
Posts: 3

PostPosted: Sun 12 Jun '16 16:42    Post subject: How to host "Motion" webcam pics to Apache2 Reply with quote

Hi,
I have got latest Raspbian Jessie, Motion and Apache2 on my raspberry pi

jpg pics are taken every 15mins and go into file /var/www where thy can be seen using ls
I want to add these to Apache2 to see them on my LAN
I can see the default page, with 'it works'. It says to replace this file before continuing, and this is where I get stuck.
How to I add my pics to the Apache2 server so I can see them?
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Sun 12 Jun '16 17:38    Post subject: Reply with quote

Quick & dirty

Rename the index.html file in /var/www/ to anything other than index.html. Once you do that and provided the Indexes option is turned on for /var/www/ you should see all the jpg files in there. This is of course assuming the index.html file that says "It Works!" is also in /var/www/ (so it's the DocumentRoot).
Back to top
jules



Joined: 12 Jun 2016
Posts: 3

PostPosted: Sat 18 Jun '16 12:29    Post subject: Reply with quote

OK, so I have all jpg pics in target directory
target_dir /var/motion and these are listed, but can't see pictures. At least I have a location for the pics.
I want to host these using apache.

In apache2, I went to sites-available

sudo nano /etc/apache2/sites-available/000-default.conf

This brings up box. Under DocumentRoot /var/www/html
I added my motion file, /var/motion saved it and did an apache reload

sudo service apache2 reload

Should I have replaced it, rather than adding it?

I get this error message

Job for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details.

Something not right, am I totally off track here?

Have spent many hours trawling apache2, motion, Jessie, but nobody has had this particular problem.

Any ideas? Thanks for advice and wisdom.
Back to top
jules



Joined: 12 Jun 2016
Posts: 3

PostPosted: Sat 18 Jun '16 12:43    Post subject: Reply with quote

Quick update to last post.

Replaced DocumentRoot /var/www/html with /var/motion
service reload, now when I go to my local IP address, the default Apache2 page I have been seeing has now changed to a white page showing

Forbidden
You don't have permission to access / on this server

I'm hosting something, not sure what.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Sat 25 Jun '16 22:22    Post subject: Reply with quote

Only changing the document root isn't enough.

there is also a permission block to that in thge config.
Back to top


Reply to topic   Topic: How to host "Motion" webcam pics to Apache2 View previous topic :: View next topic
Post new topic   Forum Index -> Apache