Pages

Showing posts with label enable. Show all posts
Showing posts with label enable. Show all posts

Saturday, September 13, 2014

Ubuntu LAMP-Enable Curl and mcrypt

To EnaBLE CURL FIRST WE NEED TO DOWNLOAD AND INSTALL 
Curl Libraries for this enable the following command
 
 sudo apt-get install curl libcurl3 libcurl3-dev php5-curl  
 
To Enable Mcrypt we need to download and Install 
Mcrypt libraries
 
 sudo php5enmod mcrypt  
 
Mcrypt is already there and is just not enabled.
 
If its still not accessible locate "mcrypt.so" if you find the same 
 at a location like 
 
/usr/lib/php5/20121212/mcrypt.so
 
edit its path in mcrypt.ini and then run the command
 
"sudo php5enmod mcrypt"
 
That's it this enables both of these php extensions. 

Friday, October 4, 2013

Page Speed-Enable gzip compression

Add the following code to .htaccess(preferably in root)


 # compress text, HTML, JavaScript, CSS, and XML  
 AddOutputFilterByType DEFLATE text/plain  
 AddOutputFilterByType DEFLATE text/html  
 AddOutputFilterByType DEFLATE text/xml  
 AddOutputFilterByType DEFLATE text/css  
 AddOutputFilterByType DEFLATE text/javascript  
 AddOutputFilterByType DEFLATE application/xml  
 AddOutputFilterByType DEFLATE application/xhtml+xml  
 AddOutputFilterByType DEFLATE application/rss+xml  
 AddOutputFilterByType DEFLATE application/javascript  
 AddOutputFilterByType DEFLATE application/x-javascript  
 # remove browser bugs  
 BrowserMatch ^Mozilla/4 gzip-only-text/html  
 BrowserMatch ^Mozilla/4\.0[678] no-gzip  
 BrowserMatch \bMSIE !no-gzip !gzip-only-text/html  
 Header append Vary User-Agent  

Sunday, September 15, 2013

Cakephp,Ubuntu-Setting Up Cakephp on Ubuntu Server/Enabling Mode_Rewrite

Recently while installing Cakephp on Ubuntu Server I face some initial setup errors.

1. Firstly rewrite_module was not enabled I enabled it using the following commands

sudo a2enmod rewrite

2.  Needed to Enable AllowOverride All For this I modified following file

/etc/apache2/sites-available/default



 <VirtualHost *:80>  
      ServerAdmin webmaster@localhost  
      DocumentRoot /var/www  
      <Directory />  
           Options FollowSymLinks  
           AllowOverride All  
      </Directory>  
      <Directory /var/www/>  
           Options Indexes FollowSymLinks MultiViews  
           AllowOverride All  
           Order allow,deny  
           allow from all  
      </Directory>  
      ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/  
      <Directory "/usr/lib/cgi-bin">  
           AllowOverride All  
           Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch  
           Order allow,deny  
           Allow from all  
      </Directory>  
      ErrorLog ${APACHE_LOG_DIR}/error.log  
      # Possible values include: debug, info, notice, warn, error, crit,  
      # alert, emerg.  
      LogLevel warn  
      CustomLog ${APACHE_LOG_DIR}/access.log combined  
   Alias /doc/ "/usr/share/doc/"  
   <Directory "/usr/share/doc/">  
     Options Indexes MultiViews FollowSymLinks  
     AllowOverride All  
     Order deny,allow  
     Deny from all  
     Allow from 127.0.0.0/255.0.0.0 ::1/128  
   </Directory>  
 </VirtualHost>  


3. Finally restart Apache

 sudo /etc/init.d/apache2 restart