Sohaib's Tech Blog

Something for every one

Magento 2.01 Broken CSS and Magento 2.01 Admin Page not found — 2016

Magento 2.01 Broken CSS and Magento 2.01 Admin Page not found

Fix is easy as I am using Apache(2), I was able to fix this by adding the following piece of code in my

000-default.conf

Located at

/etc/apache2/sites-available
<Directory /var/www/>
    AllowOverride All
</Directory>

Directory /var/www is going to be your complete path of Magento 2 store

Advertisements
Mod_pagespeed with Apache on Ubuntu — 2016

Mod_pagespeed with Apache on Ubuntu

Speed Up the Web with Google Page Speed = Apache2

If you’re on a 64-bit version (likely)…

 

wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_amd64.deb

If you’re on a 32-bit version (less likely)…

wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_i386.deb
sudo dpkg -i mod-pagespeed-*.deb apt-get -f install

Remove the downloaded package

rm mod-pagespeed-*.deb
service apache2 restart

Setup

The installation package handles a lot of configuration out-of-the-box. In fact, there are conservative defaults that are automatically enabled on Apache. Depending on the Apache version you’re running, you’ll get a different version of the module installed and enabled. If you’re running Apache 2.2,mod_pagespeed.so will be installed; Apache 2.4 users will use mod_pagespeed_ap24.so.

Note: mod_pagespeed only works with Apache 2.2 and greater. There is also a bug with Apache 2.4.1 that prevents it from working with that version. Apache 2.4.2 or greater should be used.

Additionally, configuration files have been added to your Apache installation. The primary configuration file is pagespeed.conf. This file is located at:

/etc/apache2/mods-available/

Configuration

nano /etc/apache2/mods-available/pagespeed.conf

Turn mod_pagespeed On/Off

First off, you can turn the module on or off with the ModPagespeed setting.

ModPagespeed on

or

ModPagespeed off

Rewrite Levels

You can specify different “levels” of settings to simplify any configuration. The default is“CoreFilters.” It contains a set of filters the Google team believes is safe for use. The filters are the individual actions that are applied to a file. In general, you won’t need to change this value. It’s easier to use this default and then enable or disable filters using the ModPagespeedEnableFilters andModPagespeedDisableFilters directives.

The default setting:

ModPagespeedRewriteLevel CoreFilters

To disable CoreFilters use this setting:

ModPagespeedRewriteLevel PassThrough

Note: You’ll have to explicitly enable any filters you want to turn on using the “PassThrough” setting.

Using the default “CoreFilters” rewrite level includes a number of filters by default. As of the time of this writing, it includes:?

add_head
combine_css
convert_jpeg_to_progressive
convert_meta_tags
extend_cache
flatten_css_imports
inline_css
inline_import_to_link
inline_javascript
rewrite_css
rewrite_images
rewrite_javascript
rewrite_style_attributes_with_url

New filters will be added in the future. By using CoreFilters, you’ll automatically have these filters enabled if they become part of the default set whenever you update mod_pagespeed. Using PassThrough will require you to explicitly enable the new filters.

Enable Filters

If you’d like to enable additional filters, you can pass them as a comma-separated list toModPagespeedEnableFilters. You can have multiple ModPagespeedEnableFilters directives throughout your configuration files. So, if you want to enable a filter per site, you could enable it in the virtual host configuration file or in the .htaccess file instead of in the main pagespeed.conf file.

Here’s an example that enables the Pedantic filter (which adds the type attribute to script and style tags) and the Remove Comment filter (which removes all HTML comments):

ModPagespeedEnableFilters pedantic,remove_comments

Disable Filters

You can also disable filters on a per-case basis if you’d like. Specify a list of filters you’d like to disable similar to

ModPagespeedEnableFilters

The following example disables the “Convert JPEG to Progressive” filter even though it’s part of the CoreFilters set:

ModPagespeedDisableFilters convert_jpeg_to_progressive

Specify Which URLs are Rewritten

By default, mod_pagespeed rewrites everything it can. You can disable certain files (for example Javascript libraries) from being rewritten with the following directive:

ModPagespeedDisallow "*/jquery-ui-*.min.js"

This would disable rewriting of any files that match the wildcard pattern specified (jquery UI in this case).

You can also turn off the rewriting of all files by default and only enable files you want to rewrite manually. You can do this with the following settings:

ModPagespeedDisallow "*" 
ModPagespeedAllow "http://*digitalocean.com/*/styles/*.css" 
ModPagespeedAllow "http://*digitalocean.com/*.html" 
ModPagespeedDisallow "*/notrewritten.html"

The order of execution means that all files at digitalocean.com ending in .html would be rewritten. That last Disallow directive means any URLs matching that pattern would not be rewritten because it overrides the previous setting.

Restart Apache

Don’t forget if you’re using the pagespeed.conf or VirtualHost files to alter the settings, you’ll have to restart Apache for the settings to take effect. You can do this with the following commands:

 

service apache2 restart or /etc/init.d/apache2 restart

Thank you to https://www.digitalocean.com/community/tutorials/how-to-get-started-with-mod_pagespeed-with-apache-on-an-ubuntu-and-debian-cloud-server

Apache2 w/Percona 5.6 Installation Ubuntu Willy —

Apache2 w/Percona 5.6 Installation Ubuntu Willy

Its been a long time since my last update, I was busy with family and work. Today I will show how we install Apache2 using Ubuntu latest edition Willy as of Jan-23-2016

apt-get update
apt-get install apache2 apache2-doc apache2-utils libapache2-mod-php5 php5 php5-common php5-gd php5-mysql php5-imap php5-cli php5-cgi libapache2-mod-fcgid apache2-suexec-pristine php-pear php-auth php5-mcrypt mcrypt php5-imagick imagemagick libruby libapache2-mod-python php5-curl php5-intl php5-memcache php5-memcached php5-ming php5-ps php5-pspell php5-recode php5-sqlite php5-tidy php5-xmlrpc php5-xsl memcached php5-apcu libapache2-mod-fastcgi php5-fpm -y
a2enmod actions fastcgi alias
service apache2 restart
a2enmod suexec rewrite ssl actions include cgi
a2enmod dav_fs dav auth_digest
php5enmod mcrypt

Finally we restart Apache2  for the last time

service apache2 restart

Now will install Percona Database Server Instead of MySQL Server

Fetch the repository packages from Percona web:

wget https://repo.percona.com/apt/percona-release_0.1-3.$(lsb_release -sc)_all.deb<span id="mce_marker" data-mce-type="bookmark"></span>

Install the downloaded package with dpkg. To do that, run the following commands as root or with sudo:

Once the following installed you can check Percona repositories should be added. /etc/apt/sources.list.d/percona-release.list file.

dpkg -i percona-release_0.1-3.$(lsb_release -sc)_all.deb
<span id="mce_marker" data-mce-type="bookmark"></span>
apt-get update
apt-get install percona-server-server-5.6 percona-server-client-5.6 -y<span id="mce_marker" data-mce-type="bookmark"></span>

You are Done.

Now you’ve a great rock solid Apache2 Server

You also copy and paste the complete script :-

 

apt-get update

apt-get install apache2 apache2-doc apache2-utils libapache2-mod-php5 php5 php5-common php5-gd php5-mysql php5-imap php5-cli php5-cgi libapache2-mod-fcgid apache2-suexec-pristine php-pear php-auth php5-mcrypt mcrypt php5-imagick imagemagick libruby libapache2-mod-python php5-curl php5-intl php5-memcache php5-memcached php5-ming php5-ps php5-pspell php5-recode php5-sqlite php5-tidy php5-xmlrpc php5-xsl memcached php5-apcu libapache2-mod-fastcgi php5-fpm -y

a2enmod actions fastcgi alias
service apache2 restart
a2enmod suexec rewrite ssl actions include cgi
a2enmod dav_fs dav auth_digest
php5enmod mcrypt
service apache2 restart

wget https://repo.percona.com/apt/percona-release_0.1-3.$(lsb_release -sc)_all.deb
dpkg -i percona-release_0.1-3.$(lsb_release -sc)_all.deb

apt-get install percona-server-server-5.6 percona-server-client-5.6 -y

Speed the web with Google Page speed – Click here