I'm trying to make a server with motion , lighttpd and cgi scripting bash, everything is fine excepted from outside of my network (internet). Those are my files and log. Somebody can help me please? I will really appreciate
page web on server
Ports in my router
ports do not respond to requests
netstat -tulpn
Proto Recv-Q Send-Q Adresse locale Adresse distante Etat PID/Program name
tcp 0 0 0.0.0.0:1026 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:8081 0.0.0.0:* LISTEN -
sudo motion -c motion.conf
[3958080] [ALR] [ALL] conf_load: Configfile motion.conf not found - trying defaults.: No such file or directory
[3958080] [NTC] [ALL] conf_load: Processing thread 0 - config file /etc/motion/motion.conf
[3958080] [ALR] [ALL] conf_cmdparse: Unknown config option "despeckle"
[3958080] [ALR] [ALL] conf_cmdparse: Unknown config option "gap"
[3958080] [ALR] [ALL] conf_cmdparse: Unknown config option "max_mpeg_time"
[3958080] [ALR] [ALL] conf_cmdparse: Unknown config option "output_all"
[3958080] [ALR] [ALL] conf_cmdparse: Unknown config option "output_normal"
[3958080] [ALR] [ALL] conf_cmdparse: Unknown config option "output_motion"
[3958080] [ALR] [ALL] conf_cmdparse: Unknown config option "ppm"
[3958080] [ALR] [ALL] conf_cmdparse: Unknown config option "ffmpeg_cap_new"
[3958080] [ALR] [ALL] conf_cmdparse: Unknown config option "ffmpeg_cap_motion"
[3958080] [ALR] [ALL] conf_cmdparse: Unknown config option "locate"
[3958080] [ALR] [ALL] conf_cmdparse: Unknown config option "jpeg_filename"
[3958080] [ALR] [ALL] conf_cmdparse: Unknown config option "webcam_port"
[3958080] [ALR] [ALL] conf_cmdparse: Unknown config option "webcam_quality"
[3958080] [ALR] [ALL] conf_cmdparse: Unknown config option "webcam_motion"
[3958080] [ALR] [ALL] conf_cmdparse: Unknown config option "webcam_maxrate"
[3958080] [ALR] [ALL] conf_cmdparse: Unknown config option "webcam_localhost"
[3958080] [ALR] [ALL] conf_cmdparse: Unknown config option "webcam_limit"
[3958080] [ALR] [ALL] conf_cmdparse: Unknown config option "control_port"
[3958080] [ALR] [ALL] conf_cmdparse: Unknown config option "control_localhost"
[3958080] [ALR] [ALL] conf_cmdparse: Unknown config option "control_html_output"
[3958080] [ALR] [ALL] conf_cmdparse: Unknown config option "sql_log_image"
[3958080] [ALR] [ALL] conf_cmdparse: Unknown config option "sql_log_mpeg"
[3958080] [NTC] [ALL] motion_startup: Using default log level (NTC) (6)
[3958080] [NTC] [ALL] motion_startup: Motion 3.2.12+git20140228 Started with SDL support
[3958080] [NTC] [ALL] motion_startup: Logging to syslog
[3958080] [NTC] [ALL] motion_startup: Using default log type (ALL)
[3958080] [NTC] [ALL] motion_startup: Using log type (ALL) log level (NTC)
[3958080] [NTC] [ENC] ffmpeg_init: ffmpeg LIBAVCODEC_BUILD 3685476 LIBAVFORMAT_BUILD 3680357
[0] [NTC] [ALL] main: Thread 1 is from /etc/motion/motion.conf
[0] [NTC] [ALL] main: Thread 1 is device: /dev/video0 input 8
[0] [NTC] [ALL] main: Stream port 0
[0] [NTC] [ALL] main: Waiting for threads to finish, pid: 3920
[1] [NTC] [ALL] motion_init: Thread 1 started , motion detection Enabled
[1] [NTC] [VID] vid_v4lx_start: Using videodevice /dev/video0 and input 8
[1] [NTC] [VID] v4l2_get_capability:
------------------------
cap.driver: "uvcvideo"
cap.card: "USB2.0 PC CAMERA"
cap.bus_info: "usb-3f980000.usb-1.3"
cap.capabilities=0x84200001
------------------------
[1] [NTC] [VID] v4l2_get_capability: - VIDEO_CAPTURE
[1] [NTC] [VID] v4l2_get_capability: - STREAMING
[1] [ERR] [VID] v4l2_select_input: Unable to query input 8. VIDIOC_ENUMINPUT, if you use a WEBCAM change input value in conf by -1: Invalid argument
[1] [NTC] [VID] vid_v4lx_start: Using V4L1
[1] [NTC] [ALL] image_ring_resize: Resizing pre_capture buffer to 1 items
[1] [ERR] [ALL] motion_init: Error capturing first image
[1] [ERR] [ALL] motion_loop: Video device fatal error - Closing video device
[1] [NTC] [VID] vid_close: Closing video device /dev/video0
my motion.conf https://pastebin.com/bjjepsm7
my index.html https://pastebin.com/Ga5tbcn4
lighttpd.conf
server.modules = (
"mod_access",
"mod_alias",
"mod_compress",
"mod_redirect",
# "mod_rewrite",
)
server.document-root = "/var/www"
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
server.errorlog = "/var/log/lighttpd/error.log"
server.pid-file = "/var/run/lighttpd.pid"
server.username = "www-data"
server.groupname = "www-data"
server.port = 1026
index-file.names = ( "index.php", "index.html", "index.lighttpd.html" )
url.access-deny = ( "~", ".inc" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
compress.cache-dir = "/var/cache/lighttpd/compress/"
compress.filetype = ( "application/javascript", "text/css", "text/html", "text/plain" )
# default listening port for IPv6 falls back to the IPv4 port
## Use ipv6 if available
#include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
motion.log
------------------------
cap.driver: "uvcvideo"
cap.card: "USB2.0 PC CAMERA"
cap.bus_info: "usb-3f980000.usb-1.3"
cap.capabilities=0x84200001
------------------------
[1] [NTC] [VID] [Apr 09 13:16:47] v4l2_get_capability: - VIDEO_CAPTURE
[1] [NTC] [VID] [Apr 09 13:16:47] v4l2_get_capability: - STREAMING
[1] [NTC] [VID] [Apr 09 13:16:47] v4l2_select_input: name = "Camera 1", type 0x00000002, status 00000000
[1] [NTC] [VID] [Apr 09 13:16:47] v4l2_select_input: - CAMERA
[1] [WRN] [VID] [Apr 09 13:16:47] v4l2_select_input: Device doesn't support VIDIOC_G_STD
[0] [NTC] [STR] [Apr 09 13:16:47] httpd_run: motion-httpd testing : IPV4 addr: 0.0.0.0 port: 80
[0] [ERR] [STR] [Apr 09 13:16:47] httpd_run: motion-httpd failed bind() interface 0.0.0.0 / port 80, retrying: Permission denied
[0] [ERR] [STR] [Apr 09 13:16:47] httpd_run: motion-httpd socket failed interface 0.0.0.0 / port 80, retrying: Permission denied
[0] [CRT] [STR] [Apr 09 13:16:47] httpd_run: motion-httpd ERROR bind() [interface 0.0.0.0 port 80]: Permission denied
[0] [NTC] [STR] [Apr 09 13:16:47] motion_web_control: motion-httpd thread exit
[1] [NTC] [VID] [Apr 09 13:16:47] v4l2_set_pix_format: Config palette index 17 (YU12) doesn't work.
[1] [NTC] [VID] [Apr 09 13:16:47] v4l2_set_pix_format: Supported palettes:
[1] [NTC] [VID] [Apr 09 13:16:47] v4l2_set_pix_format: (0) YUYV (YUYV 4:2:2)
[1] [NTC] [VID] [Apr 09 13:16:47] v4l2_set_pix_format: 0 - YUYV 4:2:2 (compressed : 0) (0x56595559)
[1] [NTC] [VID] [Apr 09 13:16:47] v4l2_set_pix_format Selected palette YUYV
[1] [NTC] [VID] [Apr 09 13:16:47] v4l2_do_set_pix_format: Testing palette YUYV (640x480)
[1] [NTC] [VID] [Apr 09 13:16:47] v4l2_do_set_pix_format: Using palette YUYV (640x480) bytesperlines 1280 sizeimage 614400 colorspace 00000000
[1] [NTC] [VID] [Apr 09 13:16:47] v4l2_scan_controls: found control 0x00980900, "Brightness", range 0,255
[1] [NTC] [VID] [Apr 09 13:16:47] v4l2_scan_controls: "Brightness", default -8193, current 130
[1] [NTC] [VID] [Apr 09 13:16:47] v4l2_scan_controls: found control 0x00980901, "Contrast", range 0,255
[1] [NTC] [VID] [Apr 09 13:16:47] v4l2_scan_controls: "Contrast", default 57343, current 130
[1] [NTC] [VID] [Apr 09 13:16:47] v4l2_scan_controls: found control 0x00980902, "Saturation", range 0,255
[1] [NTC] [VID] [Apr 09 13:16:47] v4l2_scan_controls: "Saturation", default 57343, current 64
[1] [NTC] [VID] [Apr 09 13:16:47] v4l2_scan_controls: found control 0x00980903, "Hue", range -127,127
[1] [NTC] [VID] [Apr 09 13:16:47] v4l2_scan_controls: "Hue", default -8193, current 0
[1] [NTC] [VID] [Apr 09 13:16:47] v4l2_scan_controls: found control 0x00980910, "Gamma", range 1,8
[1] [NTC] [VID] [Apr 09 13:16:47] v4l2_scan_controls: "Gamma", default 57343, current 4
[1] [NTC] [VID] [Apr 09 13:16:47] vid_v4lx_start: Using V4L2
[1] [NTC] [ALL] [Apr 09 13:16:47] image_ring_resize: Resizing pre_capture buffer to 1 items
[1] [NTC] [VID] [Apr 09 13:16:47] v4l2_set_control: setting control "Brightness" to 25 (ret 0 )
[1] [NTC] [STR] [Apr 09 13:16:48] http_bindsock: motion-stream testing : IPV4 addr: 0.0.0.0 port: 8081
[1] [NTC] [STR] [Apr 09 13:16:48] http_bindsock: motion-stream Bound : IPV4 addr: 0.0.0.0 port: 8081
[1] [NTC] [ALL] [Apr 09 13:16:48] motion_init: Started motion-stream server in port 8081 auth Disabled
[1] [NTC] [VID] [Apr 09 13:16:48] v4l2_set_control: setting control "Brightness" to 45 (ret 0 )
[1] [NTC] [VID] [Apr 09 13:16:48] v4l2_set_control: setting control "Brightness" to 65 (ret 0 )
[1] [NTC] [VID] [Apr 09 13:16:48] v4l2_set_control: setting control "Brightness" to 81 (ret 0 )
[1] [NTC] [VID] [Apr 09 13:16:48] v4l2_set_control: setting control "Brightness" to 97 (ret 0 )
[1] [NTC] [VID] [Apr 09 13:16:48] v4l2_set_control: setting control "Brightness" to 110 (ret 0 )
[1] [NTC] [VID] [Apr 09 13:16:48] v4l2_set_control: setting control "Brightness" to 123 (ret 0 )
[1] [NTC] [VID] [Apr 09 13:16:48] v4l2_set_control: setting control "Brightness" to 133 (ret 0 )
[1] [NTC] [VID] [Apr 09 13:16:48] v4l2_set_control: setting control "Brightness" to 140 (ret 0 )
[1] [NTC] [VID] [Apr 09 13:16:48] v4l2_set_control: setting control "Brightness" to 145 (ret 0 )
[1] [NTC] [VID] [Apr 09 13:16:49] v4l2_set_control: setting control "Brightness" to 142 (ret 0 )
[1] [NTC] [VID] [Apr 09 13:16:49] v4l2_set_control: setting control "Brightness" to 139 (ret 0 )
[1] [NTC] [VID] [Apr 09 13:16:49] v4l2_set_control: setting control "Brightness" to 136 (ret 0 )
[1] [NTC] [VID] [Apr 09 13:16:49] v4l2_set_control: setting control "Brightness" to 133 (ret 0 )
[1] [NTC] [VID] [Apr 09 13:16:49] v4l2_set_control: setting control "Brightness" to 130 (ret 0 )
[1] [NTC] [EVT] [Apr 09 13:16:50] event_new_video FPS 15
[1] [NTC] [ALL] [Apr 09 13:16:50] motion_detected: Motion detected - starting event 1


