2 apache httpd instances running on the same host

Posted in Bash on January 21st, 2010 by gmunteanu

a client of mine wanted to revert to php4, as php5 was not good for his website. i tried to convince him to migrate to a better and newer CMS, no success. the only way to make him happy was to put php4 in place.

My only solution was to place his domain on another apache instance, with libphp4.so loaded, and in lighttpd.conf to direct his domain to that apache instance.

in order to run 2 apache instances you need only to create another httpd.conf file from the existing one and change a few lines. and then with “-f” parameter you launch 2 apaches each having its own configuration file.

As you now from my older posts i have a lighty web server that acts as a proxy to the apache and jetty servers.

in lighttpd.conf i do this:

$HTTP["host"] =~ "(^|\.)DOMAINNAME\.com$" {
$HTTP["url"] =~ "\.php|\/$" {
proxy.server = ( ".php" =>
( "localhost" =>
(
"host" => "127.0.0.1",
"port" => 8094
)
),
"/" =>
( "localhost" =>
(
"host" => "127.0.0.1",
"port" => 8094
)
)

)
}
}

i copied httpd.conf to httpd_php4.conf and added/modified 4 lines:

added PidFile “/usr/local/apachephp/php4pidfile”
added LockFile “/usr/local/apachephp/php4lockfile”
modified: Listen 127.0.0.1:8094
modified: LoadModule php4_module        modules/libphp4.so

and started another apache instance that will listen on another port [8094] like this: apachectl -f /path/to/httpd_php4.conf start. if you want to stop this certain instance, or want to restart it, you add -f parameter too, say “apachectl -f /path/to/httpd_php4.conf stop”.

http://sety.ro/

lagabi.ro – apparel aggregator

Posted in Bash on January 9th, 2010 by gmunteanu

just launched http://lagabi.ro , my aggregator. it is derived from my old idea of doing a product comparison tool, but others did it while i was doing other stuff. when finally decided to launch it, i had to try another approach, and find a niche. all other product comparison sites are general, and they have the disadvantages of being generalist:

- apply same interface to all products/category of products. this is not good.

-  you can find the same intel processor in many online stores, and you can get a list with the prices they want for it. but you can’t really do that for shoes. this is why they are almost always listed with having only 1 shop as provider.

-  listing shoes in 10-15 rows per page, each row having a small image on the left , and description plus price in rest, is not good either.

- filters , same thing, cannot be adapted very much for each category of products.

so, i thought i can find a type of products that will allow me to beat them. These are shoes, clothes, bags, hats, jewelry. all  of them have image/picture as their main attribute, much more important over the others. In a processor you are interested in the specification, in a phone , if it has certain capability [though lately the look is important too], etc … .

so i gave the idea a try, and the result is http://lagabi.ro.

it is not finished. more stores and products must be added. i started with shoes and bags for women only to get some feedback, thinking this will be the most popular categories in this website.

the main features of the website are:

  • horizontal scrolling and pagination
  • big accent on the image of the product
  • filters, being able to get what you want fast

Horizontal scrolling and pagination is my biggest bet, i hope users will validate my presumption, that this is the way you want to browse apparel.

it is done in mootools, the great js library, and on the server side it uses java. Lazy initialization is used a lot, to make the interface responsive, and reduce page load times. pagination is done by first loading 16 products [8 columns], and when the user drags and goes right,another 16 are brought and showed. the colors are extracted with imagemagick’s great tool: convert.

the design is dark, i had 50/50 opinions of how it shoud be. right now it stays this way.

Hope you enjoy it, or your girlfriends as of now. as for you my male-readers, please wait a little more time.