Enable mod_rewrite on Ubuntu 16.04 to work with WordPress

You will need Ubuntu 16.04 server with basic “how to” LAMP stack installation. (5 min how to will be added soon) sudo a2enmod rewrite sudo systemctl restart apache2 sudo vim /etc/apache2/sites-available/000-default.conf   <VirtualHost *:80> <Directory /var/www/html> Options Indexes FollowSymLinks MultiViews AllowOverride All Require all granted </Directory> … … … </VirtualHost> sudo systemctl restart apache2  …

kill multiple processes with awk

 ps aux | grep httpd root       329  0.0  0.0 103236   856 pts/0    S+   12:49   0:00 grep httpd root     30954  0.0  1.0 258980 10744 ?        Ss   10:39   0:00 /usr/sbin/httpd apache   30956  0.0  0.6 258980  6196 ?        S    10:39   0:00 /usr/sbin/httpd apache   30957  0.0  0.6 258980  6196 ?        S    10:39   0:00 /usr/sbin/httpd apache   30958  0.0  0.6 258980 …

Red Hat Linux – Can not find the Gnome enviroment.

Installed nxserver and trying to connect with nxclient. Error message: Install following: “X Window System” Mandatory Packages: yum install bitmap-fonts desktop-backgrounds-basic xorg-x11-drivers xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi  xorg-x11-fonts-ISO8859-1-100dpi  xorg-x11-fonts-ISO8859-1-75dpi xorg-x11-fonts-Type1 xorg-x11-fonts-misc xorg-x11-fonts-truetype xorg-x11-server-Xorg xorg-x11-xauth xorg-x11-xfs xorg-x11-xinit “GNOME Desktop Environment” Mandatory Packages: yum install control-center  gnome-applets gnome-panel gnome-session gnome-terminal  metacity nautilus yelp Also follwing might also be required: bitmap-fonts…

php53 + apc

Today I have come across this problem: [root@www ~]# php -v PHP:  syntax error, unexpected BOOL_FALSE in /etc/php.ini on line 995 PHP Warning:  PHP Startup: Unable to load dynamic library ‘/usr/lib64/php/modules/fileinfo.so’ – /usr/lib64/php/modules/fileinfo.so: undefined symbol: php_pcre_exec in Unknown on line 0 PHP Warning:  PHP Startup: Unable to load dynamic library ‘/usr/lib64/php/modules/zip.so’ – /usr/lib64/php/modules/zip.so: undefined symbol:…

phpinfo from cli/terminal

php -r “phpinfo();” You can also use it: [root@www ~]# php -r “phpinfo();” | grep apc apc apc.cache_by_default => On => On apc.canonicalize => On => On apc.coredump_unmap => Off => Off apc.enable_cli => Off => Off apc.enabled => On => On apc.file_md5 => Off => Off apc.file_update_protection => 2 => 2 apc.filters => no…

Apache – deny access by referrer

Create .htaccess file in main (root) directory of your webserver/website with following content: RewriteEngine On # Options +FollowSymlinks RewriteCond %{HTTP_REFERER} firstdomain\.net [NC,OR] RewriteCond %{HTTP_REFERER} anotherdomain\.com RewriteRule .* – [F]

Magento extensions for Red Hat server

Use EPEL repo: RH 5: http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm RH 6: http://download.fedora.redhat.com/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm yum install mysql-devel php-mysql php perl-XML-Simple php-mcrypt mhash php-mhash php-gd perl-XML-DOM perl-Text-Iconv curl php-soap && pecl install pdo && pecl install pdo_mysql