dracoblue.net

Agavi Seite mit NGINX einrichten (mit PHP-FPM)

Ich bin es eigentlich gewöhnt meine Agavi Seiten mit Lighttpd auszuliefern. Seit kurzem läuft vieles hinter dem Nginx. Da die Konfiguration für mich nicht so gewohnt war, möchte ich hier einfach mal veröffentlichen, wie ich Nginx mit Agavi eingerichtet hab. Am besten die Stellen anpassen wo "HINT:" steht.

Erstmal braucht man php5-fpm. Unter ubuntu ging es so:

$ sudo apt-get install php5-fpm

Nun eine Datei anlegen:

$ vim /etc/nginx/sites-enabled/dracoblue.net

Und das folgende dort rein tun:

server {
    listen dracoblue.net:80;
    # HINT: Hier auf alle Fälle server_name setzen, sonst sieht Agavi nicht, dass es sich
    # um dracoblue.net handelt und generiert die URLs mit "localhost" oder ähnlichem
    server_name dracoblue.net;

    location / {
        # HINT: Das Verzeichnis wo die index.php ist
        root   /home/dracobluenet/tags/1.0.0/pub;
        index index.php;

        # HINT: Alle Anfragen (außer an "static") sollen index.php ausgeliefert werden
        location ~* ^/(favicon.ico|robots.txt|static) {
            break;
        }

        # HINT: Alle Anfragen (außer an "static") sollen index.php ausgeliefert werden
        if ($uri !~ "^/(favicon.ico|robots.txt|static|index.php)") {
            rewrite ^/([^?]*)$ /index.php?/$1 last;
        }
    }

    location ~ \.php($|/) {
        include /etc/nginx/fastcgi_params;
        fastcgi_pass 127.0.0.1:9000;
        # HINT: Das Verzeichnis wo die index.php liegt $fastcgi_script_name
        fastcgi_param SCRIPT_FILENAME /home/dracobluenet/tags/1.0.0/pub$fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_script_name;
    }
}

Wie Du siehst, haben meine Projekte normalerweise lediglich den "static" Ordner, der nicht von Agavi ausgeliefert. Das sorgt dafür, dass der nginx nicht so viel ausprobieren muss um rauszufinden, ob die datei von php ausgeliefert wird oder nicht. Hier habe ich auch noch robots.txt und das favicon.ico hinzugefügt, weil man die meistens ja auch im root hat.

Nun noch Nginx neu starten:

$ /etc/init.d/nginx restart

In agavi, articles, lighttpd, linux, nginx, php by DracoBlue @ 09 Dec 2010 | 272 Words

LFE (sub-woofer) disabled in Ubuntu 10.10 Maveric Meerkat

When I updated to ubuntu 10.10, I had this mysterious problem.

The sub-woofer just worked one time right after I clicked the "5.1 System" in the ubuntu sound options. As soon as a song ended, the sub-woofer was mute again.

I expected this to be an issue of the pulseaudio integration in 10.10. The reason was way simpler!

In 10.10 by default:

enable-lfe-remixing = no

is set in

/etc/pulse/daemon.conf

Just change this to

enable-lfe-remixing = yes

and pulseaudio will mix the 2 channel sound tracks up to the 5 channels including LFE!

In articles, linux, open source, ubuntu by DracoBlue @ 05 Dec 2010 | 107 Words

Cannot connect to ICQ on Ubuntu Maveric Meerkat

Today I expirienced the issue, that

empathy (the ubuntu icq, msn, facebook, ... client) was not able to connect to ICQ anymore.

To fix that issue, just install pidgin ppa (yes, I know you want empathy, but you'll need libpurple to fix it for empathy!).

Then

$ sudo apt-get update && sudo apt-get dist-upgrade

You'll see something like:

Configuring libpurple-bin ein (1:2.7.5-1ubuntu2+pidgin1.10.10) ...
Configuring libpurple0 ein (1:2.7.5-1ubuntu2+pidgin1.10.10) ...

and everything is fine again. Just restart empathy!

Thanks to twenty-three for the hint.

In articles, linux, open source, ubuntu by DracoBlue @ 18 Nov 2010 | 96 Words

Update for Mootools Youtube Player

Today I updated the YtMooPlayer.js-component (

showcase).

A while back the youtube chromeless api of google changed, so it was manadatory to set the "version"-parameter.

The new 1.0.1 version of YtMooPlayer.js fixes this issue.

You can download the youtube mootools class at dracoblue.net or pull the source from github.

In javascript, mootools, open source by DracoBlue @ 07 Nov 2010 | 52 Words

PhpDebugToolbar 1.1.1 (for agavi) released

Today I am pleased to announce the availability of the Agavi PHP DebugToolbar for download. After the success of the Qos-Filter for agavi, I want to relaunch the useful agavi toolbar with a different name, a better look and feel and a way better code base.

Screenshot:

What is PhpDebugToolbar? Like you can see on the screenshot, it's a little Toolbar (written in JS+CSS), which keeps track of all stuff happening in your php agavi application. So you can easily spot memory leaks, time exhausting tasks and extensive usage of database queries (with the doctrine extension).

Additionally it integrates easily into the logging system of agavi, just add the PhpDebugToolbarLoggerAppender class in your logging.xml!

Where to download Toolbar? The source can be found on github now http://github.com/DracoBlue/PhpDebugToolbar, feel free to fork it and send pull request with new features!

Download for PhpDebugToolbar 1.1.1 (just 20KB) is also available here at dracoblue.net.

Short installation and configuration information can be found in the readme. Thanks to all contributors!

This is meant to be a lightweight alternative to the unofficial Agavi Debug Tools. It won't have FirePHP output or other neat features, which ship with Agavi Debug Tools. So if you need them: use adt, please!

In agavi, javascript, open source, php, phpdebugtoolbar by DracoBlue @ 21 Oct 2010 | 214 Words

Page 14 - Page 15 - Page 16

Give something back

Were my blog posts useful to you? If you want to give back, support one of these charities, too!

Report hate in social media Campact e.V. With our technology and your help, we protect the oceans from plastic waste. Gesellschaft fur Freiheitsrechte e. V. The civil eye in the mediterranean

Recent Dev-Articles

Read recently

Recent Files

About