LouWii's Blog

< Web developer & geek stuff />

Page 2 of 68

Full blog posts written by me, without all this Twitter stuff.

Configuring an email server on Ubuntu 16.04

DigitalOcean has made a great guide to configure an email server that only sends email. If your email inbox are stored somewhere else, your server don’t need to receive and store any email. Configuring it to only send email is making it easier to maintain and less subject to hack/viruses.

Before reading the guide, I’ve created 2 subdomains that points to my server and I will use them in the tutorial.

Well in fact I created one twice, with an A type and AAA type to be sure both ipv4 and ipv6 are working. The A type must point to your server IPv4, the AAA type to your server IPv6. Let’s call it serv.site.com.

Once that’s done, I had to configure my reverse server IP. I found that in my server IP settings. For both IPv4 and IPv6, I’ve set the reverse to my previously created subdomain, serv.site.com. That will make Google and probably other email services happy. More on that on Google Documentation.

Next step, go and follow the tutorial. When entering the domain, I entered the subdomain I created, serv.site.com, not just site.com.

Go read the guide there


PHP7 FPM configuration with Apache 2.4

After struggling a bit to find a working configuration for my PHP server setup based on PHP 7 FPM and Apache 2.4, here’s my working config.

Activate Apache actions mod: sudo a2enmod actions

Edit /etc/apache2/mods-available/fastcgi.conf

Basically, that’s telling apache to use PHP executable when someone is requesting a .php file.

Be sure php7.0-fpm service is running sudo service php7.0-fpm status. If not, start it sudo service php7.0-fpm start.

Here’s an example of a virtual host config file


DJI Phantom 3 Standard / 4K modding, improvements and advice

I’ve recently got a DJI Phantom 3 Standard mainly to get nice shots of places I visit.

I’ve made some research about how to improve the drone in order to get the best experience possible. Also, being a geek/dev, I checked out the software hack on the drone/controller which is quite interesting.

I’ve grouped all what I found in this post. Enjoy.

Continue reading

Extend Django User Model

Django CMS has its own User model but you might need to add attributes and other properties to it (like an avatar, right ?). The easiest way to do that is to extend that model with another model (we’ll call it UserProfile) and link them together using a one-to-one relationship.

Creating the UserProfile model

Nothing special here, I’m sure you know how it works.

Creating a UserProfile when creating a User

Each User needs to have a UserProfile object. To make sure that applies to every user, we’ll create a UserProfile each time a User is created. To do that. we’ll use the post_save signal (signals doc).

Just under the UserProfile code, you can add that code

And you’re pretty much good to go. You can access the user’s UserProfile using user.user_profile.

Find Application Support Directory in Swift (OSX, iOS)

It’s quite easy actually, once you know the answer…


« Older posts Newer posts »

© 2018 LouWii's Blog

Theme by Anders NorenUp ↑