Ubuntu 12.04 – Install OpenPanel

11

The OpenPanel team doesn’t support Ubuntu 12.04 server officially yet, but I got it installed with a few alternate steps and it seems to work fine. I have it running in a production environment.

The original installation steps for older Ubuntu versions are described at http://www.openpanel.com/download/openpanel-download/. But for Ubuntu 12.04 just follow the steps below and it will work. Make sure you execute all steps as root.

nano /etc/apt/sources.list

Add the following lines at the very bottom of /etc/apt/sources.list, save it and go back to the terminal with Ctrl + X and than Y for the More >

Solr 3.5 – Wildcard search as SQL LIKE

1

The Solr schema.xml has by default the “string” fieldType.

<fieldType name="string" class="solr.StrField" sortMissingLast="true" />

Add the following fieldType to your schema.xml and use it as field type for your field:

<fieldType name="string_rev" class="solr.TextField" sortMissingLast="true">     <analyzer type="index">         <tokenizer class="solr.KeywordTokenizerFactory"/>         <filter class="solr.LowerCaseFilterFactory" />         <filter class="solr.PatternReplaceFilterFactory" pattern="(\s+)" replacement="" replace="all" />         <filter class="solr.ReversedWildcardFilterFactory" />  

More >

Git delete local and remote branch

1

First checkout a different branch than the one you want to delete, for example the master branch.

git checkout origin master

Solution 1

To delete your local and remote branch execute the following. “-r” stands for remote and “-d” for delete.

git branch -rd example

Solution 2

First delete the local branch:

git branch -d example

And after that also the remote branch:

git push origin :example

Varnish 3 – Block ip addresses

3

To block ip addresses with Varnish edit the following file:

sudo nano /etc/varnish/default.vcl

And add the following. Of course replace the example ip addresses with the real ips you want to block.

acl forbidden {     "111.11.111.111";     "123.12.123.123";     "456.123.12.72"; } sub vcl_recv {     # Block access from these ips     if (client.ip ~ forbidden) {         error 403 "Forbidden";     } }

After editing, execute:

sudo service varnish restart

Varnish 3 – Exclude a virtual host

1

If you have multiple virtual hosts on your webserver, installing Varnish will cause all virtual hosts to be cached. With VCL it’s possible to exclude some virtual hosts.

sudo nano /etc/varnish/default.vcl
sub vcl_recv {     # Don't cache domain1.com or domain2.org - optional www     if (req.http.host ~ "(www\.)?(domain1.com|domain2.org)\.(com|nl|org|dev|local)") {         return (pass);     } } sub vcl_deliver {     # You can optionally set a reponse header so it's easier for you to debug

More >

Ubuntu 12.04 – Install Varnish 3 in front of Apache 2

5

Step 1: Install latest version of Varnish (3.0)

These first three lines are probably not required on Ubuntu 12.04 because the main repository already contains version 3, but you can use it anyhow. Older version of Ubuntu do need it though!

curl http://repo.varnish-cache.org/debian/GPG-key.txt | sudo apt-key add -
echo "deb http://repo.varnish-cache.org/ubuntu/ lucid varnish-3.0" | sudo tee -a /etc/apt/sources.list
sudo apt-get update
sudo apt-get install varnish

Step 2: Set backend server (Apache)

Edit the varnish configuration file.

sudo nano /etc/varnish/default.vcl

Set the backend server. The lines below say that the backend server (Apache) is available More >

Test in IE6/7/8/9 on Ubuntu 12.04 with VirtualBox image

0

It’s always a bit difficult to test your webapplications in Internet Explorer if you are developing on Ubuntu. Your default test browser there will most likely be firefox. But with with VirtualBox and Microsoft’s “Internet Explorer Application Compatibility VPC Image” it’s possible to test your website in a native IE6, IE7, IE8, IE9 and so on. Even on different platforms like Windows XP, Windows Vista or Windows 7!

It’s a bit hard to set it up, but let me show you how!

UPDATE: Testing IE with VirtualBox on linux has become easier with the xdissent ievms project! More >

Go to Top