Posts Tagged: ubuntu

How to use different user and group for just one Virtual Host in Apache

apacheWith the mpm-itk that is a multi-processing module (MPM) you can run each virtualhost with it’s own user id and group id. This is basically used to make a shared hosting secured, since you don’t have to make all virtualhosts folders readeable by apache user.

mpm-itk is based on the traditional prefork MPM, which means it’s non-threaded; in short, this means you can run non-thread-aware code (like many PHP extensions) without problems.

Press continue reading for more.

How to solve “Falling back to the standard locale” in ubuntu

Falling back standard locale

Sometimes you can get a error like this:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_PAPER = “pt_BR.UTF-8”,
LC_ADDRESS = “pt_BR.UTF-8”,
LC_MONETARY = “pt_BR.UTF-8”,
LC_NUMERIC = “pt_BR.UTF-8”,
LC_TELEPHONE = “pt_BR.UTF-8”,
LC_IDENTIFICATION = “pt_BR.UTF-8”,
LC_MEASUREMENT = “pt_BR.UTF-8”,
LC_TIME = “pt_BR.UTF-8”,
LC_NAME = “pt_BR.UTF-8”,
LANG = “en_US.UTF-8”
are supported and installed on your system.
perl: warning: Falling back to the standard locale (“C”).

Press continue reading to understand how to fix this!


How to change timezone in ubuntu

To change timezone in ubuntu, just use that in terminal:

sudo dpkg-reconfigure tzdata

How to remove all old kernels in ubuntu

Ubuntu-Logo

To remove all old kernels in Ubuntu be sure to be running in the latest kernel installed. For that just do a ls /boot check which one is the newer kernel and then compare with the one running using uname -a.

The script to remove:

dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/(.*)-([^0-9]+)/1/")"'/d;s/^[^ ]* [^ ]* ([^ ]*).*/1/;/[0-9]/!d' | xargs sudo apt-get -y purge