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

April 8, 2020

Vps with openVZ problems

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

If you ever encounter problems on your vps, first please check this

cat /proc/user_beancounters

If you see failcnt >0 then you have some limitation problems.

April 3, 2020

How to bypass htpasswd with specific ip

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

If you have code below and want to bypass your ip then you need to go to final form

AuthType Basic
AuthName “Private area”
AuthUserFile /var/www/html/dpath/.htpasswd
Require valid-user

Into this:

AuthType Basic
AuthName “Private area”
AuthUserFile /var/www/html/dpath/.htpasswd
Require valid-user

Order allow,deny
Allow from
satisfy any

January 30, 2020

Ubuntu 18 imagemagick convert: not authorized

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

Well on ubuntu 18 try to convert some pdf error

convert: not authorized /pdf/original/70/5770.pdf' @ error/constitute.c/ReadImage/412. convert: no images defined/pdf/processed/70/5770.jpg’ @ error/convert.c/ConvertImageCommand/3258.

The solution is to modify the /etc/ImageMagick-6/policy.xml

At the end this

domain=”coder” rights=”none” pattern=”PDF”

Into this

domain=”coder” rights=”read|write” pattern=”PDF”

pdftk ubuntu 18

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

Today I have tried to install pdftk on ubuntu 18 . After search on developer site I saw that are package only for the redhat/centos.

So after a few search find out that you can install it with snap install pdftk

However this will not work .

Error: Unable to find file.
Error: Failed to open PDF file:
Errors encountered. No output created.
Done. Input errors, so no output created.

Errors like this you will see.

One solution is to download and install from other links

cd /tmp
# download packages
wget \ \ \

And after that you can install them with 
sudo apt-get install ./libgcj17_6.4.0-8ubuntu1_amd64.deb \
    ./libgcj-common_6.4-3ubuntu1_all.deb \
    ./pdftk_2.02-4build1_amd64.deb \

After that you can remove those from /tmp directory

How to Install PHP-FPM with Apache on Ubuntu 18.04

Filed under: Linux — Tags: , — admin @ 3:33 pm

Common module for php are

apt install php7.1-fpm php7.1-common php7.1-mysql php7.1-xml php7.1-xmlrpc php7.1-curl php7.1-gd php7.1-imagick php7.1-cli php7.1-dev php7.1-imap php7.1-mbstring php7.1-soap php7.1-zip php7.1-bcmath -y

To install apache

apt install apache2

Enable mod proxy

sudo a2enmod proxy_fcgi

A virtual host example

<VirtualHost *:80>
     ServerName External_IP_Address
     DocumentRoot /var/www/html

     <Directory /var/www/html>
          Options Indexes FollowSymLinks
         AllowOverride All
         Require all granted

     <FilesMatch ".php$"> 
         SetHandler "proxy:unix:/var/run/php/php7.1-fpm.sock|fcgi://localhost/"          
      ErrorLog ${APACHE_LOG_DIR}/error.log
      CustomLog ${APACHE_LOG_DIR}/access.log combined  

« Newer PostsOlder Posts »

Powered by WordPress