User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
mission:resources:picoprint:software [2014/01/08 13:11] – [Install and compile sunxi-tools] chronomission:resources:picoprint:software [2015/01/26 22:15] (current) – [GPIOs] chrono
Line 167: Line 167:
 </code> </code>
  
 +<code>
 +emerge -pv nginx pycurl mjpg-streamer
 +</code>
  
 +===== GPIOs =====
  
 +http://docs.cubieboard.org/tutorials/common/using_python_program_control_gpios
 +===== nginx config =====
  
 <code> <code>
-emerge -pv nginx pycurl mjpg-streamer+worker_processes  1; 
 + 
 +events  
 +
 +    worker_connections  1024; 
 +
 + 
 +http  
 +
 +    include            mime.types; 
 +    default_type       application/octet-stream; 
 +    sendfile           on; 
 +    keepalive_timeout  65; 
 + 
 +    map                 $http_upgrade $connection_upgrade  
 +    { 
 +        default         upgrade; 
 +        ''              close; 
 +    } 
 + 
 +    upstream            "octoprint"  
 +    { 
 +        server          127.0.0.1:5000; 
 +    } 
 + 
 +    upstream            "framecam"  
 +    { 
 +        server          127.0.0.1:8080; 
 +    } 
 + 
 +    server  
 +    { 
 +        listen       80; 
 +        server_name  feliks; 
 + 
 +        client_max_body_size 50M; 
 + 
 +        location /framecam/ 
 +        {    
 +            proxy_pass http://framecam/; 
 +            proxy_buffering off; 
 +        } 
 +         
 +         
 +        location /sockjs 
 +        {   
 +            proxy_pass http://octoprint;   # NO trailing slash  
 +            proxy_buffering off; 
 +            proxy_http_version 1.1; 
 +            proxy_set_header Upgrade $http_upgrade; 
 +            proxy_set_header Connection $connection_upgrade; 
 + 
 +        } 
 + 
 +        location /  
 +        { 
 +           
 +            set $pp_d http://127.0.0.1:5000; 
 +            if ( $args = 'action=stream' ) { 
 +                set $pp_d http://127.0.0.1:8080/$is_args$args; 
 +            } 
 +             
 +            if ( $args = 'action=snapshot' ) { 
 +                set $pp_d http://127.0.0.1:8080/$is_args$args; 
 +            } 
 + 
 +            proxy_pass $pp_d; 
 +            proxy_http_version 1.1; 
 +            proxy_set_header Upgrade $http_upgrade; 
 +            proxy_set_header Connection "upgrade"; 
 +            proxy_set_header Host $host:$server_port; 
 +            proxy_set_header X-Forwarded-Proto $scheme; 
 +            proxy_set_header X-Forwarded-For $remote_addr; 
 +            proxy_set_header X-Forwarded-Port $server_port; 
 +            proxy_set_header X-Request-Start $msec;  
 +           
 +        } 
 + 
 +        # redirect server error pages to the static page /50x.html 
 +        error_page   500 502 503 504  /50x.html; 
 +        location = /50x.html  
 +        { 
 +            root   html; 
 +        } 
 +    } 
 +}
 </code> </code>
 +
 +{{tag>lab 3d-printer picoprint robot cubieboard gentoo}}
 +
 +{{keywords>Apollo-NG hackerspace hacker space development makerspace fablab lab community open-resource open resource mobile hackbus 3d-printer picoprint robot cubieboard gentoo}}
 +
 +~~DISCUSSION~~