Enable mod_rewrite on Apache for Debian Rumi, September 8, 2015 To enable and load mod_rewrite, do the following. $ sudo a2enmod rewrite Then open up the following file, and replace every occurrence of “AllowOverride None” with “AllowOverride all”. $ sudo vi /etc/apache2/sites-available/default or $ sudo vi /etc/apache2/sites-available/000-default Finally, restart Apache2. $ sudo service apache2 restart Continue Reading
Install Phalcon framework in Debain 6/7 Rumi, June 6, 2014 This repo can be used additionally to the squeeze-php54 repo of dotdeb.org. Add the following into /etc/apt/sources.list deb http://debrepo.frbit.com/ frbit-squeeze main Add the key, update apt and install packages wget -O – http://debrepo.frbit.com/frbit.gpg | sudo apt-key add – aptitude update aptitude install php5-igbinary php5-mongo php5-oauth php5-phalcon php5-runkit php5-stats php5-stomp php5-yaf… Continue Reading
Installing Apache2, PHP5, MySQL and PHPMyadmin On Debian Rumi, December 8, 2013 First we install MySQL 5 like this: apt-get install mysql-server mysql-client You will be asked to provide a password for the MySQL root user – this password is valid for the user root@localhost as well as root@server1.example.com, so we don't have to specify a MySQL root password manually later on:… Continue Reading
.htaccess URL redirect Rumi, November 13, 2013 # This allows you to redirect your entire website to any other domain Redirect 301 / http://mt-example.com/ # This allows you to redirect your entire website to any other domain Redirect 302 / http://mt-example.com/ # This allows you to redirect index.html to a specific subfolder Redirect /index.html http://example.com/newdirectory/ # Redirect… Continue Reading
Hide the Apache Web Server Version number with ServerSignature and ServerTokens directives Rumi, March 7, 2013 You can easily hide Apche (httpd) version number and other information. There are two config directives that controls Apache version. The ServerSignature directive adds a line containing the Apache HTTP Server server version and the ServerName to any server-generated documents, such as error messages sent back to clients. ServerSignature is… Continue Reading
Securing directory using .htaccess file Rumi, February 25, 2013October 20, 2013 First make sure your Apache configuration is set for allowing .htaccess. Read this Article first before you move to the next steps. .htaccess File Creation: Let's assume /test-dir1 is to be password protected. $ cd /var/www/html/test-dir1 $ vi .htaccess Write the following lines into this file: AuthName "Authorized Users Only."… Continue Reading
Apache Web Server .htaccess File functional Rumi, February 8, 2013 .htaccess is Apache's directory-level configuration file. It allows end user to configure authentication and other options without editing main httpd.conf file. Make sure AccessFileName set to .htaccess Search httpd.conf for AccessFileName directive. It defines name of the distributed configuration file: # grep -i AccessFileName httpd.conf Make sure users are allowed… Continue Reading
Force HTTPS / SSL using .htaccess and mod_rewrite Rumi, February 7, 2013 Sometimes you may need to make sure that the user is browsing your site over securte connection. An easy to way to always redirect the user to secure connection (https://) can be accomplished with a .htaccess file containing the following lines: RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]… Continue Reading
Adjust Apache ServerLimit and MaxClient Rumi, January 6, 2013 MaxClients actually tells the apache to allow this many concurrent clients. Normally this limit is at 150. You can change this limit by editing your httpd.conf file. httpd.conf is normally located at /etc/httpd/conf/httpd.conf nano /etc/httpd/conf/httpd.conf ServerLimit directive to let the value of MaxClients above 256 work. By deafult ServerLimit is… Continue Reading
Windows Apache SSL Rumi, July 13, 2012 Step 1 – What You Need A copy of Apache that includes SSL support. A copy of OpenSSL. An openssl.cnf file. The copy of Apache that I had installed on my machine did not include SSL support, so I moseyed on down to the Apache download page. You’ll notice on… Pages: 1 2 Continue Reading