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

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');

January 4, 2017

Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

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

Today I wanted to upgrade a php webserver with php5.6 . However the epel didn’t work .
After a yum clean all got this title error

Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

To fix this I needed to upgrade the ceritiface without epel .

yum upgrade ca-certificates –disablerepo=epel
After this all works.

May 23, 2016

qmail with plesk

Filed under: Linux — Tags: , , , , — admin @ 2:47 pm

Some short commands

List out all messages currently in queue by running:
/var/qmail/bin/qmail-qread
Count the number of messages in the queue currently by running:
/var/qmail/bin/qmail-qstat

Delete all mails from queue

/usr/local/psa/admin/sbin/mailqueuemng -D

 

March 25, 2016

Download java with wget

Filed under: Linux — Tags: , , — admin @ 12:44 pm

Well to download java using wget  you can do like this

wget --no-check-certificate --no-cookies --header \ 
"Cookie: oraclelicense=accept-securebackup-cookie"  \
http://download.oracle.com/otn-pub/java/jdk/8u73-b02/jdk-8u73-linux-x64.rpm

September 25, 2015

Remove all files created before a certain date

Filed under: Linux — Tags: , , , , — admin @ 12:45 pm

What I want is to delete manually all e-mail that are before 01/01/2015

The command is
find /directory/path -type f ! -newermt 2015-01-01 -ls -exec rm -f {} \;

« Newer PostsOlder Posts »

Powered by WordPress