How to , and other stuff about linux, photo, php … Another blog just like others on internet

June 13, 2017

How to fix upstream timed out (110: Connection timed out) error in Nginx

Filed under: Linux — Tags: , , , — admin @ 1:36 pm

In order to fix that you need to add

proxy_read_timeout 300;

 

May 29, 2017

How to install git composer globally

Filed under: Linux,Php — Tags: , , — admin @ 10:28 am

Hello

The easy way to install composer globally is to run bellow commands


curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer

April 25, 2017

how to disable gzip for specific file

Filed under: Linux,Php — Tags: , , , , , , — admin @ 1:33 pm

The short answer is

RewriteRule ^dashboard/index - [E=no-gzip:1]
SetEnvIf REDIRECT_no-gzip 1 no-gzip

Some explination of that solution

The – means NOOP, E means set variable, 1 is the value. After redirects, the variables are renamed and prepended with REDIRECT_.

This work for php FPM

If you have a mod dso you can use also this

apache_setenv('no-gzip', '1');

February 13, 2017

courier imap authtest

Filed under: Linux — Tags: , , — admin @ 5:40 pm

Today wanted to test a user and password of a e-mail if are correct .

So to do that

/usr/sbin/authtest account@domain.com ‘password’

Returned

Authenticated: module authvchkpw
Home directory: /home/vpopmail/domains/domain.com/account
UID/GID: 7797/2109
AUTHADDR=account@domain.com
AUTHFULLNAME=account
OPTIONS=<none>

January 20, 2017

grub-install error: no such disk

Filed under: Linux — Tags: , , , — admin @ 6:42 pm

Well a new problem . After one hard failure in raid .. when I try to grub-install /dev/sda

This error appear

/usr/sbin/grub-probe: error: no such disk.
Auto-detection of a filesystem of /dev/md1 failed.
Please report this together with the output of “/usr/sbin/grub-probe –device-map=/boot/grub/device.map –target=fs -v /boot/grub” to <bug-grub@gnu.org>

So the fix is .. after you mount the partition like in this link http://matrafox.info/reinstall-grub-after-raid-crash.html

1. mv /boot/grub/device.map /boot/grub/device.map.old
2. grub-mkdevicemap
3. update-grub2 && grub-install /dev/sda && grub-install /dev/sdb

« Newer PostsOlder Posts »

Powered by WordPress