blog.plee.me About software, technology and random things

17Dec/160

Installing mod_cloudflare For Apache HTTPd 2.4 On Debian 8 (Jessie) Via Aptitude Repository

[Update on 2019-09-19] Warning: From Debian 9 (stretch) upwards, according to the official documentation Cloudflare has dropped support for mod_cloudflare. Instead they recommend replacing it with the new alternative: the official Apache HTTPd module mod_remoteip.

Hi!

If you are using the Cloudflare proxy functionality, you will find that your web server will end up only working with Cloudflare's IPs instead of the visitors'. After quite some time I thought that there has to be a better way to go about this, and I found mod_cloudflare, a solution officially developed by Cloudflare themselves.

When I was looking at the official Cloudflare documentation on how to install mod_cloudflare for Apache 2.4 on Debian 8 (Jessie) today, I was disappointed to find that they were only recommending manual ways: installing a .deb package or compiling the module yourself.

Luckily I found a guide on how to accomplish the installation with the standard apt-get / aptitude tool for Debian / Ubuntu.

This is how:

  1. Add the aptitude repository to a new sources list file, e.g. at /etc/apt/sources.list.d/cloudflare-main.list - with this content:
    deb http://pkg.cloudflare.com/ jessie main
  2. Download the Cloudflare repository key and add it to the aptitude known keys:
    # wget https://pkg.cloudflare.com/pubkey.gpg
    # apt-key add pubkey.gpg
    # rm pubkey.gpg
  3. Update the aptitude cache:
    # aptitude update
  4. Look at which packages are available in the new repository:
    # grep ^Package: /var/lib/apt/lists/pkg.cloudflare.com_dists_jessie_main_binary-amd64_Packages
  5. Install mod_cloudflare:
    # aptitude install libapache2-mod-cloudflare
  6. Restart the Apache HTTPd service:
    # service apache2 restart

Hopefully this way of installing will enable everyone to update / maintain it much more easily and with less one-time use packages installed.

Additionally, this could prove even more useful for people who want to install more Cloudflare packages.

I am confident that this method also works for Ubuntu and other versions of Debian - just replace the "jessie" part in the aptitude sources list file with your distribution major release codename (like "wheezy" for Debian 7 or "vivid" for Ubuntu 15.04).

Thanks for reading!

Original source: https://emtunc.org/blog/01/2016/installing-mod_cloudflare-ubuntu-14-04-apache-server/

1Dec/130

Installing the Logitech F710 Wireless Gamepad on Windows 7 x64 (XInput Driver)

Update from 2015-10-18: Windows 10 Pro (x64) does not appear to require this workaround. It automatically installed the correct driver and allowed me to use the controller right away.

Hi!

In order to be able to benefit from using the XInput mode for the Logitech F710 Wireless Gamepad, of course you need to install the correct driver. This is made a little hard for Windows 7 x64 seeing as there is no driver that comes with the device itself.

I found a guide on how you can manage it by using Microsoft's official Xbox 360 Controller driver.

Be careful though, you're messing with driver files. Use this guide at your own risk.

  1. Go to the Microsoft Hardware downloads page: http://www.microsoft.com/hardware/en-us/downloads
  2. Click on the category "Gaming"
  3. Click on the link "Xbox 360 Wireless Controller for Windows"
  4. Download the correct version of the file (Windows 7 64-bit only) and install it
  5. Open the Device Manager (e.g. [Windows]+[Break] => Device Manager)
  6. Right-click on the entry with "Logitech F710" in its name and the yellow triangle icon in front of it
  7. Open its properties
  8. Switch to the "Details" tab
  9. Choose the property "Hardware Ids"
  10. Right-click on the one without the "&REV_<Number>" at the end of the name and copy it. It should look something like this: USB\VID_046D&PID_C21F
  11. Go to the directory in which you installed the Xbox 360 Accessories Software a minute ago: C:\Program Files\Microsoft Xbox 360 Accessories
  12. Open the file Xusb21.inf with a plain text editor like Notepad
  13. At the top in the commented section you can see the line containing "Wireless Common Controller USB\Vid_045E&Pid_0719". Search for "USB\Vid_045E&Pid_0719" and replace each occurence with the hardware ID you copied earlier. Afterwards, save it to the file. You might need to have your editor program in elevated privilege mode in order to do so.
  14. Go back to the Device Manager with the open F710 properties window
  15. Switch to the "Driver" tab
  16. Click on the "Update Driver..." button
  17. In the assistant, choose "Browse my computer for driver software"
  18. Choose the path "C:\Program Files\Microsoft Xbox 360 Accessories"
  19. Confirm the driver warning and you're good to go

To check if it really worked, you can just press the Logitech button on the game controller and it should cause a little frame with the Xbox logo, the text "Click for Help" and a down-pointing arrow button and an X button to pop up in the lower center of your screen.

I do not usually recommend modifying driver files like that, but I have used this method before and it worked for me, so I stopped looking for a better way, as there doesn't seem to be any official solution provided by Logitech themselves (which is a shame).

Original post and the ones who can be credited with this solution: post by breakfastmonkey on the official Logitech forums (referencing a couple of previous posts in the same thread).

Thanks for reading.