login: root

Monthly Archive: February 2012

Adding bridge interface for lxc containers

You can make a bridge by changing network configuration file:

In this configuration I used br0 static configuration. If You need dhcp, You can use this configuration:

Could not chdir to home directory /home/nsc: Permission denied /bin/bash: Permission denied Connection to closed.

after creating lxc container, I wasn’t able to connect to it as a simple user. Also couldn’t change to simple user using “su”. All I got was an error:

All permissions of home directory were correct, as to be 100% sure, deleted user and created again. Still the same problem. The problem was / permissions. It was 700, so simple user couldn’t change to any directory. Small fix to make it working (with root user)

And that’s it, user is working!!!

varnish+nginx as backend and real IP

With default config nginx all IP addresses shows as localhost. Here is configuration to show real client IP. Snippet from varnish config:

Snippet from nginx config:

Replace string in all files using sed in linux

Replaces all “OLDSTRING” to “NEWSTRING” in all files

or using find:

%d bloggers like this: