All posts by mlapaglia

Proxying Apache Connections to Multiple Applications

I was having issues getting Apache working with Plex, OwnCloud, and SyncThing at the same time on a new server. I wanted to have a reverse proxy set up, so instead of

http://server.com:32400/web/index.html
http://server.com:8384/syncthing/
http://server.com/owncloud

I could have

http://server.com/
http://server.com/syncthing
http://server.com/owncloud

Apache’s reverse proxy functionality caters to this need.
Each app gets its own ProxyPass, telling Apache what to do with incoming requests.
SyncThing didn’t like operating without a trailing slash in the URL, so a rewrite rule was created to do this for the user.
OwnCloud, since it doesn’t require operating on a separate port, simply goes around the proxy.
Everything else falls into the catchall, which redirects the user to Plex.

#redirect everything to SSL
<VirtualHost *:80>
        RewriteEngine On
        RewriteCond %{HTTPS} off
        RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</VirtualHost>

<VirtualHost *:443>
        ServerName server.com

        #SSL configuration
        SSLEngine on
        SSLCertificateFile /etc/ssl/certs/server.crt
        SSLCertificateKeyFile /etc/ssl/private/server.key
        SSLCertificateChainFile /etc/ssl/certs/intermediate.crt
        
        #begin the proxying
        ProxyRequests Off
        ProxyPreserveHost On

        #let owncloud pass straight through
        ProxyPass /owncloud !

        #syncthing doesn't work without a trailing slash in browser URL
        RewriteRule ^/syncthing$ /syncthing/ [R]
        ProxyPass /syncthing/ http://127.0.0.1:8384/
        ProxyPassReverse /syncthing/ http://127.0.0.1:8384/

        #default go to plex
        ProxyPass / http://127.0.0.1:32400/
        ProxyPassReverse / http://127.0.0.1:32400/

        RewriteEngine on
        RewriteCond %{REQUEST_URI} !^/web
        RewriteCond %{HTTP:X-Plex-Device} ^$
        RewriteRule ^/$ /web/$1 [R,L]
</VirtualHost>

JTech 2.8W Laser Upgrade Kit Part 3

Simply reflashing the smoothieboard with the latest firmware caused the PWM to start working correctly. Quite an anticlimactic result considering i picked up a new Rigol scope to troubleshoot the issue!

As seen, a 0-100% duty cycle reflected correctly on both the scope and the observed intensity of the laser.

79PAOkb

Here’s a quick video of the kit cutting up some dense 1/2″ open cell foam.

I am still trial-and-erroring the focal depth of the laser. Right now it takes 5-6 passes to cut all the way through the foam. It starts around 12mm off the bed and moves down 1mm per layer. This is pretty dense foam though.

For basic shapes like circles for these marbles I’m simply creating a cylinder in Google Sketchup, exporting it to cura, generating the gcode, and then manually editing the gcode in Notepad++.

Here are some of the results:
2015-09-11-17h00m14

2015-09-11-17h59m38