Posts Tagged linux

Why is my .htaccess not working?

If you have a VPS or Linux server running Apache the goold old fashioned way without fancy control panels, you’ll quickly have to learn some Apache tweaks.

One of the main issues we commonly run into is a non-working .htaccess file.  Apache doesn’t come with .htaccess support automatically turned on.  You’ll have to turn it on in order for .htaccess files to have an effect.  Here’s what you do:

There are two ways,

  1. Edit your httpd.conf manually using a text editor like vim, nano, vi, joe whatever you like.
  2. Edit your httpd.conf through Webmin

Since the Webmin version is more graphical, we’ll show you how to do it through Webmin.  If you’re using a text editor, just skip to the portion with the AllowOveride command.

  1. Login to your Webmin
  2. Servers>Apache
  3. Go to the Global Configuration tab
  4. Click on EDIT CONFIG FILES
  5. Search for AllowOveride and .htaccess and remove the # sign in front or type “AllowOveride All”.

This should fix it permanently and allow your .htaccess files to override pretty much and directive needed.

Tags: , , , ,

How to install YUM manually on RedHat/RHEL 4.x or Centos 4.x

Invariably, you may find yourself with a missing YUM install or a corrupted installation and need to re-install yum to fix this problem.

Yum of course is used to easily install RPM packages like PHP or Apache or pretty much anything.  It’s equivalent would be “apt-get” on Debian based Linux systems.

So here’s how you would install YUM from scratch:
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/libxml2-2.6.16-10.i386.rpm
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/libxml2-python-2.6.16-10.i386.rpm
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/python-elementtree-1.2.6-5.el4.centos.i386.rpm
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/sqlite-3.3.6-2.i386.rpm
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/python-sqlite-1.1.7-1.2.1.i386.rpm
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/rpm-python-4.3.3-22_nonptl.i386.rpm
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/python-urlgrabber-2.9.8-2.noarch.rpm
rpm -Uvh ftp://ftp.pbone.net/mirror/ftp.centos.org/4.6/os/i386/CentOS/RPMS/yum-metadata-parser-1.0-8.el4.centos.i386.rpm
rpm -Uvh ftp://ftp.pbone.net/mirror/ftp.centos.org/4.6/os/x86_64/CentOS/RPMS/yum-2.4.3-4.el4.centos.noarch.rpm

Just copy and paste the above RPM code into your SSH session.

Tags: , , ,

Performance Optimization WordPress Plugins by W3 EDGE