Internal Server Error - Invalid command 'RewriteEngine' (Ubuntu Apache/PHP)

What is Internal Server Error?

It usually a server misconfiguration (check .htaccess file) or problem with your server side script.

First of all check for error log


sudo vim /var/log/apache2/error.log

If log file become empty then enable it via php.ini

For php7
$ sudo vim /etc/php/7.0/apache2/php.ini 


For php5
$ sudo vim /etc/php5/apache2/php.ini 

Find display_errors, display_startup_errors
, error_reporting
 (Which look’s like below)

;   Default Value: On
;   Development Value: On
;   Production Value: Off

;   Default Value: Off
;   Development Value: On
;   Production Value: Off

;   Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
;   Development Value: E_ALL
;   Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT

Uncomment it via removing semicolons (After change it will look like below)

;   Default Value: On
;   Development Value: On
;   Production Value: Off

;   Default Value: Off
;   Development Value: On
;   Production Value: Off

;   Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
;   Development Value: E_ALL
;   Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT

Restart apache via below command

$ sudo service apache2 restart 


$ sudo /etc/init.d/apache2 restart

Now check in error.log file for Internal Server related problem.

If in error log you got module related problem like below:

/var/www/html/.htaccess: Invalid command ‘RewriteEngine’, perhaps misspelled or defined by a module not included in the server configuration 

Then perform below command for above error which enable rewrite module of apache2:

$ sudo a2enmod rewrite && sudo service apache2 restart

That’s it. You are done :)

What is GitHub Pages, Jekyll, Poole, Hyde and Hydeout?

Hello, Hope all good!

This is the first post on my personal blog and I want everyone to know how I setup this site using Jekyll and GitHub Pages.

Please read below things step by step as per their reference source and get to know about this. Good Luck!!

What is GitHub Pages?

GitHub Pages is a static site hosting service.

GitHub Pages is designed to host your personal, organization, or project pages directly from a GitHub repository.
You can create and publish GitHub Pages online using the Jekyll Theme Chooser.

GitHub Pages is a static site hosting service and doesn’t support server-side code such as, PHP, Ruby, or Python.


What is Jekyll?

Jekyll is a simple, blog-aware, static site generator for personal, project, or organization sites. Written in Ruby by Tom Preston-Werner, GitHub’s co-founder, it is distributed under an open source license.

Instead of using databases, Jekyll takes the content, renders Markdown or Textile and Liquid templates, and produces a complete, static website ready to be served by Apache HTTP Server, Nginx or another web server.

Jekyll is the engine behind GitHubPages, a GitHub feature that allows users to host websites based on their GitHub repositories.


Few useful article’s related to Jekyll and GitHub Pages:
Setting up your GitHub Pages site locally with Jekyll
Building a static website with Jekyll and GitHub Pages

Meet Poole

Poole is the butler for Jekyll, the static site generator.

It’s designed and developed by @mdo to provide a clear and concise foundational setup for any Jekyll site.
It does so by furnishing a full vanilla Jekyll install with example templates, pages, posts, and styles.



Hyde is a brazen two-column Jekyll theme that pairs a prominent sidebar with uncomplicated content. It’s based on Poole, the Jekyll butler.

Hyde is a theme built on top of Poole, which provides a fully furnished Jekyll setup—just download and start the Jekyll server.


Finally Hydeout?

Hydeout updates the original Hyde theme for Jekyll 3.x and adds new functionality.

Hydeout is available as the jekyll-theme-hydeout Ruby Gem.
Add gem "jekyll-theme-hydeout", "~> 3.4" to your Gemfile and run bundle install

Hydeout uses pagination, so if you have an, you’ll need to swap it with an index.html that uses the index layout:

layout: index
title: Home

Find out more by visiting the project on GitHub.