Category: How to

  • TP-Link Deco Mesh Wifi Setup on Xfinity

    While trying to setup TP-Link Deco mesh wifi devices, I found that it was easy to plug one of the devices into my existing wifi router. The Deco creates its own wifi network, however, instead of boosting the signal where it was plugged in.

    Problem: Light Turned Red

    I tried to replace my router with the Deco, and I ran into a problem. The light turned red after creating the Wi-Fi name and password.

    Solution

    On Xfinity, the correct IPTV/VLAN settings are:

    • Turn on IPTV/VLAN
    • Connection type Dynamic IP
    • Mode Bridge

    Where to input these settings

    1. Open the Deco app
    2. Navigate to More -> Advanced -> IPTV/VLAN

    This helped me configure my TP-Link Deco Mesh W3600 devices, but may work for other wifi networks using Xfinity internet.

  • Nginx Configuration Files for Laravel Valet

    I switched to Laravel Valet for local WordPress development on my Macbook in December 2019. I love it. I presented at January’s WordPress Lancaster meetup about how and why I made the move.

    This week, I’ve written some code that protects uploads to the WordPress Media Library. (Did you know that anyone can view uploads if they find the URLs? The Media Library uses only security by obscurity.) To code my solution, I’m using an .htaccess file to protect a subfolder in wp-content/uploads.

    There is No .htaccess in Nginx

    .htaccess files do not work in Laravel Valet because it uses the nginx web server instead of Apache. (And, Valet does not use a reverse proxy to allow Apache features to work while running the faster nginx.) nginx does not allow its configuration to be changed on-the-fly, and that’s one reason it’s faster than Apache.

    To replicate the protected folder mechanism, I learned how to block access to a directory inside an nginx configuration file, but that introduced a new challenge: Where is the nginx configuration file? Most resources will identify usr/local/etc/nginx/nginx.conf as the configuration file, and while that’s correct, changing it and restarting Valet did not change the behavior of the folder.

    Nginx Config File Location for Laravel Valet

    Each site you create inside Valet gets its own configuration file at this location: ~/.config/valet/Nginx/sitename.test This is the file you should edit.

    Restart Valet to Allow Configuration Changes to be Loaded

    Nginx needs to be restarted in order for configuration changes to take effect, and I found it easy to use this command inside Terminal: valet restart