Currently Browsing: Linux

apache 2.2 run php as username with fcgid

One of my problem is to secure a little websites at least to run as their user and not as apache . In this way if one wordpress is hacked not all website to be modify by that script . On internet you will find something like this <IfModule mod_fcgid.c> MaxRequestLen 15728640 FcgidConnectTimeout 20 SuexecUserGroup username groupname <Directory /var/www/vhosts/> Options +ExecCGI AllowOverride All AddHandler fcgid-script .php FCGIWrapper /var/www/wraper/ .php Order allow,deny Allow from all </Directory> </IfModule> All is fine in some situation works . However I notice that if you have the php 5.6 installed this won’t work . I try all loglevel debug and other stuff but it simply didn’t start that wraper with that user in process list. After some more dig I found out that /etc/httpd/conf.d/php.conf is different then on other php version and in this 5.6 that file have a SetHandler . So the solution is to overwrite again that SetHandler So in your vhost before add this IfModule you need to add also <FilesMatch \.php$> SetHandler None </FilesMatch>...
read more

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

In order to fix that you need to add proxy_read_timeout 300;  
read more

How to install git composer globally

Hello The easy way to install composer globally is to run bellow commands curl -sS | php sudo mv composer.phar /usr/local/bin/composer
read more

how to disable gzip for specific file

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

courier imap authtest

Today wanted to test a user and password of a e-mail if are correct . So to do that /usr/sbin/authtest ‘password’ Returned Authenticated: module authvchkpw Home directory: /home/vpopmail/domains/ UID/GID: 7797/2109 AUTHFULLNAME=account OPTIONS=<none>
read more

« Previous Entries