Neuer Proxy/ Loadbalancer macht die Homepages schneller

Filed Under (Cloud Computing, Server, Uncategorized, Web Development) by a.huser on 23-01-2012

0

Guten Tag

Wir haben vergangene Woche einen neuen Proxy Server und Loadbalancer (Apache Mod_proxy) vor unseren Cloud Hosting   Webserver installiert. Um von diesem Dienst zu profitieren, der die Geschwindigkeit der Ladezeit der jeweiligen Homepage erheblich verringert, gehen Sie wie folgt vor:

1. Ändern Sie den DNS-Record Ihrer Webseite auf die IP-Adresse 82.220.55.108. Nach dem DNS-Renewal wird Ihre Seite über den Loadbalancer beschleunigt.

2. Dies hat zur Folge, dass in der  Statistik die Zahl der Hits geringer wird, weil einige Inhalte vom Proxy zwischengespeichert werden. Die Visits werden dank Mod_rpaf auf den Webserver korrekt angezeigt. Statistik- Tools (z.B. Google Analystics und Awstats) müssen nicht angepasst werden.

3. Wenn Sie ihre direkten Änderungen auf Ihrer Website vornehmen wollen beachten Sie bitte, dass der Proxy Server die Inhalte zwischenspeichert und Veränderungen am Design zeitverzögert angezeigt werden.

4.Um den Proxy- Cache zu umgehen legen Sie eine Alias- Webseite an ( z.B. dev.website.com) und lösen den DNS für diese Alias Webseite auf die IP 82.220.55.107 auf. So werden Ihre Änderungen in Echtzeit angezeigt.

Dieser Service ist im Webhosting enthalten, und wird ab Ende Februar für alle Kunden zum Standard

Wenn Sie den Proxy- Service jetzt schon verwenden, bitten wir Sie uns ein Feedback zu geben, so können wir Änderungen vornehmen und unsere Dienstleistung optimieren.

EC2 cloud computing – shortest introduction ever!

Filed Under (Cloud Computing, Internet, Server, Web applications, Web Development) by lukas on 03-12-2009

0

What is cloud computing? The basic idea is to have an abstracted model to separate physical IT infrastructure from logical IT infrastructure. Think about the OSI-Layer model and map it to the various infrastructure sets. (e.g. A customer is interested in the availability of a service. He doesnt care about the availability of the exact physical system.) This is called “Infrastructure as a service” short: IaaS

There are other aspects in cloud computing, which provide PaaS (Platform as a Service, e.g. Hosting) or SaaS (Software as a Service, e.g. Salesforce). Since EC2 allows logical
Since EC2 envirements allow a massive scaling of logical infrastructure, often the term “elastic” is used to describe parts of this technology.

EC2 compatible solutions (e.g. Eucalyptus and UEC) provide IaaS Services. The logical it is split into several components:

  • A Cloud Controller: The frontend coordinating everything. It’s accessed by an API, on the client side there are the ec2 tools on the shell or plugins like elasticfox for firefox.
  • A Storage Controller: This unit provides all the storage for the cloud. The storage comes in form of S3 which is also accessible over the web by API tools. It stores files as “Objects” in a “Bucket” objects can be made into “Bundles” by adding a prefix in front of their name. Another form of storage provided is EBS (Elastic Block Storage), which are partition images on the Storage controller, accessible by virtual instances (see below).
  • A Cluster Controller (Eucalyptus term, Amazon refers to clusters as “regions”): This unit controls the physical hardware and network configuration in the cluster.
  • Cloud Nodes: The physical servers running the cloud infrastructure.

The logical infrastructure built in the cloud consists of virtual servers, the so called instances. Instances are stored in form of templates. Every instance launched is started from the template, and looses all changes on termination. So specific configurations and data have to be stored in S3 or EBS. This seems a weird paradigm change at first, but makes perfectly sence, once you look at the migration paths available: Any kind of instance can be upgraded by upgrading and testing the template and then relaunching the instances. This massively reduces migration and administration cost, and makes this tasks just… elastic!

Was bringt VTiger 5.1?

Filed Under (Web applications, Web Development) by lukas on 27-11-2008

0

Gemäss diesem Blog-Post eine ganze Menge, hier die Highlights:

Alles Dinge, auf die wir schon lange warten. Schade dass gemäss Roadmap der 5.1 Milestone erst zu 18% erreicht ist. Mit einem Release dürfte man also erst Mitte 2009 rechnen können.

Curl statt fopen

Filed Under (Web Development) by lukas on 16-07-2008

0

Da die PHP-Einstellung allow_url_fopen = On als unsicher gilt, muss sie ausgeschaltet werden. Als Konsequenz lassen sich keine urls mehr als Dateien öffnen:

include_once('http://domain.com/sourcefile.php');
$fp = fopen('http://domain.com/file.txt', 'rw');

Der Link oben erklärt ausführlich, warum das so ist: Wenn man URL’s als Dateien öffnen kann, kann man auch beliebigen PHP-, SQL- oder JavaScript-Code nachladen.

Wenn man trotzdem URL’s öffnen muss, ist Curl eine Alternative. Die Client URL Library ist eine Art Browser. So lassen sich Dateien aus URL’s auch ohne fopen öffnen:

$out = fopen('downloads/newfile.zip');
$ch = curl_init('http://domain.tld/file.zip');

curl_setopt($ch, CURLOPT_FILE, $out);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_URL, $file);

curl_exec($ch);
if($ch == false) { echo "
Error is : ".curl_error ( $ch); }

curl_close($ch);

Joomla 1.5 Videotutorials, Deutsche Sprachdateien, Template Builder…

Filed Under (Internet, Web Development) by lukas on 14-05-2008

0

Joomla 1.5 ist ja schon seit einer Weile draussen. Zeit mal ein paar nette Links & Fakten aufzuschreiben:

Symfony Cheat Sheets

Filed Under (Web Development) by lukas on 28-02-2008

0

Rund um das Symfony Framework gibts eine ganze Menge Cheat Sheets:

Aufbau & Konfiguration:

Model & Database:

View Layer:

Testing:

Keeping remote directory up to date

Filed Under (OS & Software, Web Development) by lukas on 14-02-2008

0

Coding locally and testing on a remote server, is often troublesome.
For example, forgetting to update the server results in useless tests.
Easiest way is to automatically synchronize the wanted folders.

For Windows I use WinSCP, which allows to easily to keep a remote directory updated.
For Linux, there is a script from Lukas Meyer:

  • livesync
    #!/bin/bash
    #infinite loop, we can end the script hitting ctrl+c
    #define options as array
    declare -a options#set first empty position with new value
    options[${#options[*]}]=”site1″;
    options[${#options[*]}]=”site2″;
    options[${#options[*]}]=”site3″;while [ true ] ; do
    #we create a menu to select which site to update
    select site in “${options[@]}” ; do
    #based on the selection, the syncscript with the proper arguments is called
    case ${site} in ${options[0]})
    syncscript /site1/local/folder server_ip1 username1 password1 /var/www ;
    ;;
    (site2)
    syncscript site2/local/folder server_ip2 username2 password2 site2/remote/folder ;
    ;;
    (site3)
    syncscript site3/local/folder server_ip3 username3 password3 site3/remote/folder ;
    ;;
    esac;
    done
    done
  • syncscript
    #!/usr/bin/expect -f
    #the she bangs line, to find out the path to expect on your system, type "which expect" on the shell
    #we get the command line arguments
    set localfolder [lrange $argv 0 0]
    set server_ip [lrange $argv 1 1]
    set username [lrange $argv 2 2]
    set password [lrange $argv 3 3]
    set remotefolder [lrange $argv 4 4]#this disables the timeout, so our script waits as long as it takes for the transfer
    set timeout -1
    #this calls rsync based on the command line args
    spawn rsync -r -a -v $localfolder $username@$server_ip:$remotefolder –exclude .svn
    #this avoids that if the output is to large, the earlier bytes won’t be fotgotten
    match_max 100000#we’re expecting the password prompt, we use a pattern so it can be anything that contains password: or Password
    expect “*?assword:*”
    #after we get the prompt we send the password
    send — “$password\r”
    #then we send a newline to make sure we get back to the command line
    send — “\r”#wait for the end-of-file in the output
    expect eof

Eclipse mit SVN für PHP

Filed Under (Web Development) by lukas on 15-10-2007

0

Neben den Zend-IDE’s gibts auch ein anderes, Zend-Unterstütztes IDE-Framework: Eclipse PDT (Downloads)

Zusammen mit dem SVN-Plugin Subclipse und dem mitgelieferten Zend Debugger entsteht eine sehr Brauchbare PHP-IDE. Im Anhang an diesem Beitrag befindet sich eine importierbare XML mit den nötigen Eclipse-Sites. Wenn Sie Eclipse neu installieren empfehlen wir aber, gleich das All-In-One PDT zu nehmen.

Weitere Infos:

  • Eclipse PDT Einführung
  • Subclipse Anleitung
  • Anleitung für PDT und Aptana (seehr cooler Editor für JavaScript und HTML mit SFTP- und FTP-Unterstützung). Aus folgenden Gründen wird Aptana von uns aber nicht verwendet:
    • Ungenügende PHP-Unterstützung
    • (S)FTP-Synchronsisation zu langsam.
    • JavaScript-Debugging und Verification wird im Firefox mit Firebug erledigt (siehe Beitrag dazu)
    • Bei dynamischem JavaScript, wie z.B. in Symfony, das Serverseitig “gebaut” und an den Client gesendet wird, lässt sich der Debugger eh nicht verwenden.

Step-By-Step PHP-Debugging im PDT erfordert übrigens Zugriff auf einen PHP-Webserver mit Zend- oder XDebug-Debugger. Wir werden noch eine Anleitung liefern.

Firefox für CSS, HTML, und Ajax

Filed Under (Web Development) by lukas on 13-10-2007

0

Firefox ist für Webentwickler ein sehr interessantes Tool. Seine Plugin-Schnittstelle wird auch für Entwicklungs- und Webmastertools rege benutzt:

  • Webmaster:
    • FireFTP: Ein FTP-Client für Firefox, unterstützt FTPS und bietet ein Synchronisations-Feature.
  • Webdesign:
    • LocaleSwitcher: Zwischen verschiedenen Sprachen wechseln.
    • Lorem Ipsum-Generator: Generiert den Lorem Ipsum-Text zum Testen von Schriftbildern, Formularen etc.
    • Web Developer Toolbar: Bietet diverse Tools wie hervorheben von Tabellenzellen, Div’s oder anzeigen von CSS-Elementen sowie class- und id-Informationen. Sehr praktisch sind auch der eingebaute Masstab, die Verlinkung mit den W3C-Validatoren, und die Auflösungs-Funktion, die das Fenster auf eine bestimmte Auflösung anpasst.
  • Webentwicklung:
    • FireBug: Ein Debugger für JavaScript, CSS, HTML. Neben Profiling von Ladezeiten und JavaScripts kann FireBug auch Step-By-Step JavaScript debuggen. Ein HTTP-Protokollmonitor gehört ebenfalls zum Umfang.

Was gehört in den open_basedir pfad?

Filed Under (Web Development) by lukas on 24-09-2007

0

Die Direktive open_basedir erlaubt, unabhängig von Safemode oder Permissions, den Zugriff von PHP-Skripten auf bestimmte Verzeichnisse einzuschränken. Dabei kommt es aber manchmal zu Problemen, wenn folgendes vergessen wurde:

  • Der session.save_path: PHP kann keine Sessions abspeichern, wenn der Zugriff auf diesen Pfad verboten ist.
  • Das upload_tmp_dir: PHP kann sonst nich auf hochgeladene Dateien zugreifen, das Hochladen an sich klappt aber.
  • Der include_path: PHP kann sonst keine Libraries im include_path öffnen.

Was nicht hineingehört:

  • Pfad zu /tmp: Hier werden auch von Systemapplikationen temporäre Dateien gespeichert.
  • Pfad zu sendmail: Liegt, zumindest bei Debian, im /usr/sbin. Dieser Pfad gehört ganz sicher nicht in eine Web-Konfiguration… Sendmail wird übrigens trotzdem gefunden.