Category Archives: Web Server

Web Server

Enable register_globals in one virtual host

one of my client wanna install prestashops.

They want register globals off and session autostart setting to off.

Those setting only applied to their store only, not affect whole setting.

Because I have setting to httpd.conf I just add two lines :

<VirtualHost 222.124.140.27 >
ServerAdmin webmaster@clientdomain.com
DocumentRoot /home/clientname/public_html/store
ServerName store.clientname.com
php_flag register_globals off
php_value session.auto_start 0
</VirtualHost>

Yes, master value leave intact and this setting only available to store.clientname.com

To verifiy it you can use phpinfo().

Linux Unix Web Server

Learning .htaccess : 101 way

My friend got suprised when he see login page on phpmyadmin. It’s not usual form for login as he used to login for.

Well, another postfixadmin admin page also show login page. He ask  me to list all tutorial around .htaccess to show for his learning study.

Like I did in Cisco Lab Topology, Cisco Resources or Ipfw Resources , I think I search google too for existing tutorial, Learning On Demand rules icon smile Learning .htaccess : 101 way

Here’s what I found so far :

  1. .htaccess Tips and Tricks  part I creating this hidden file in the root folder (or any sub folder) of your website, it is possible to set/unset almost all the server directives that can be set in the apache main configuration file. And these changes will take effect only for the root folder in which you created the file and its sub folders. Thus .htaccess file plays an important role in providing fine-grained control to an individual managing a website without giving blanket control of the web server.
  2. .htaccess Tips and Tricks  part II, the arcane mysteries of URL rewriting.
  3. Hotlink test for image, find out if your .htaccess protect your images.
  4. Setting Up .htaccess, htaccess can be used in co-ordination with the Apache web server to password protect certain files and directories on your web server.
  5. .htaccess file generator, create .htaccess file online.
  6. How to Configure Your Website Using Htaccess in Linux with Apache, .htaccess files (or "distributed configuration files") provide a way to make configuration changes on a per-directory basis. A file, containing one or more configuration directives, is placed in a particular document directory, and the directives apply to that directory, and all subdirectories thereof.
  7. HOWTO php.ini overrides with .htaccess,
    in smaller environments where there are only a few developers and a single product there is seldom a need for different values of a php.ini setting. however, depending on how esoteric some of the developers in your group are, or how many projects you have going simultaneously, or how many devs you have working on the same box or you have production and development running on the same box or whatever; you may at some point find a need to have different values for certain php.ini settings for different environments hosted on a single server. the good news is, if youre running apache, php has integrated support for this need.
    .htaccess overrides are especially attractive in shared hosting environments where there is a high likelihood different clients will want different settings for php.ini directives.
  8.  .htaccess Based Authentication On Subdirectories.

 

last update :  November 22 2007

Web Server

1610 temperature violation detected

New server arrive, HP proliant ML 350 G4 P . With four SCSI HD.

ready to replace our old email server icon smile 1610 temperature violation detected

Just a problem that arise with heatsink that prompt message " 1610 temperature violation detected "

sighhh…

wait more than 5 minutes for cold the machine has no impact.

A few result from google lead me to this post,

After remove "sticker like" stuff  between heatsink and cpu make everything goes normal.

simple thing but make me nuts for  few days icon sad 1610 temperature violation detected

Moral of story : keep fight icon smile 1610 temperature violation detected

 

Unix Web Server

Modify Server Banner with mod_security

Apache/2.2.4 (Win32) PHP/5.2.1

Microsoft-IIS/6.0

Apache

GWS/2.1

Yes, my friend like to collect what server that run with specific domain.

Such online tools exist in internet like :

Netcraft

Untroubled

Using these tools, server can be "guest" but how accurate this information and whats this information for?

just for fun, nothing else icon smile Modify Server Banner with mod security

I just try mod_security within freebsd box to modify it’s banner which result :

"Solaris 10"

for apache 1.37 I run

Steps :

1. Install mod_security

kongja# whereis mod_security
mod_security: /usr/ports/www/mod_security
kongja# cd /usr/ports/www/mod_security
kongja# make install

2. Edit httpd.conf

Make sure this line exist :

LoadModule security_module    libexec/apache/mod_security.so

3. Activate mod_security by adding these lines in httpd.conf to modify the banner

SecFilterEngine On

SecServerSignature "Solaris 10"

4. Restart apache server and finish

Check  again using netcraft or untroubled

Change Solaris 10 to other, like GWS/2.1 ( google engine? hehehehe) or girlfriend name icon smile Modify Server Banner with mod security

Untroubled

 Modify Server Banner with mod security

Netcraft

 Modify Server Banner with mod security

 

Web Server

No more 192.168.1.1, avoid it in your network!

Sigh… I hate 192.168.1.1

Since a lot of router or access point built in ip configured for 192.168.1.1 by default

Same ip make ipconflict and make my day ruined

Message for other newbie

don’t use 192.168.1.1 as ip for your server

use other ip like : 192.168.1.112 or 192.168.1.252 it’s safer from 192.168.1.1

get it out from your master plan icon smile No more 192.168.1.1, avoid it in your network!

PHP Web Server

Hide php extension for social engineering purpose

First thoughts when see these url :
http://www.mydomain.com/about.pl

this site use perl

http://www.mydomain.com/about.cfm

this site use cfm

http://www.mydomain.com/about.htm

or

http://www.mydomain.com/about.html

then you might think about ordinary htm/html file

is it true?

read more »

PHP Web Server

Testing mail() function with agrosoft mail server 2

In my last post I have introduce about Agrosoft mail server (AMS) . Since this day isn’t end yet, I’ll start by word “Lets continue today lesson” icon smile Testing mail() function with agrosoft mail server 2

I start by opening MS-Frontpage then make simple form mail which generate HTML code for me and I save it as contact.htm

Code in send_mail.php :

<?php

mail(“alamster@localhost”,”Form Mail”,”$message”,”From: tes@localhost”);

echo “Got your message ! Thank You very much “;

?>

Save both file in htdocs or www directory.

Call it from browser :

http://localhost/contact.htm

read more »

PHP Web Server

Testing mail() function with agrosoft mail server …

logo argo Testing mail() function with agrosoft mail server …Soon or later every people who learn php will meet PHP lovely function for sending email mail()

Unfortunately many beginner who install only PHP, MYSQL and Apache in windows don’t know how to test their email script like contact form, mailing list etc.

Today, I’ll show how to install mail server software available in internet called Argosoft Mail Server.

Pre requirement :

- Working WAMP application ( I use XAMPP Lite Portable)

Ok, now go to Argosoft website and download Mail Server ( Choose Freeware)

Important Argosoft Mail Server ( AMS ) feature that we need:

1. POP3 server

POP3 server responsible for retrieving email from server

2. Built-in web server with webmail

We need to check our script result

Step by step :

Install exe file by double click

install argo1.0 Testing mail() function with agrosoft mail server …

Click setup

install argo2.0 Testing mail() function with agrosoft mail server …

Click Install tab to begin installation process

Start running your mail server

Just double click AMS icon in desktop to start this application

New instance of AMS will start and reside on tray

To make sure no service conflict , click the AMS icon on the tray to find out

install argo4.0 Testing mail() function with agrosoft mail server …

As you see there is error message “address already in use”, by default web server will use port 80

We do have apache running in that port , click CTRL + O to configure new port for AMS web server. (choose PORTS tab)

install argo5 Testing mail() function with agrosoft mail server …

Change Web Interface port from 80 to anything you want , I already have port 8080 for Oracle port so I choose 8083

Exit from AMS and start again

install argo6 Testing mail() function with agrosoft mail server …

Now web server run on port 8083

Try open from browser :

http://localhost:8083

install argo7 Testing mail() function with agrosoft mail server …

If You see this page it means your job is finish, You have working mail server plus webmail .

Next time I’ll continue on adding new user and testing script for mail() function.

See You

Update : part II is compelete, also with video.

PHP Web Server

OpenBSD 4.0 is Out

fbsd.0 OpenBSD 4.0 is OutI just realized that today is November 1 and a few big thing release :

My Freebsd 6.1 need upgrade and so my openbsd box ( 3.7)

I still new in CI , CI attract me for its active development and huge support of supportive fan.

I decide to move PCT to version 2.0 with CI as framework now still in learning phase , setup coding guideline for teamwork etc.

Need to sleep now

It’s wget time icon smile OpenBSD 4.0 is Out

Web Server

Add fancy alias for your localhost or 127.0.0.1

A few student in my class ask me how to change default address for testing php script from http://localhost or http://127.0.0.1 into some real name like derick.com or google.com while they offline at home and no internet connection availabe at home .

After googling for /etc/hosts equivalent finaly I got the answer, still related name :

HOSTS

Just doing this :

Find file named : HOSTS

in

C:WINDOWSsystem32driversetcjust put name you like :

I type alamster.com for 127.0.0.1

here my HOST file looks like

127.0.0.1       localhost

127.0.0.1       alamster.com

save the file

restart my computer and next time after my computer up I can use http://alamster.com as alternative of http://localhost or http://127.0.0.1

PHP Web Server

Easy PHP Installer , XAMPP or WAMP ?

php Easy PHP Installer , XAMPP or WAMP ?
In my recent study to help me study PHP5, I’m looking forward for “easy php installer” that can help me to code in PHP4 (production) and then easily change to PHP5 (learning OOP).

I used to use Appserv in my laptop or office PC but now it can’t help me any longer with PHP5 and PHP4 since I have to choose between appserv for PHP5 OR PHP4 .

Searching with uncle google help me find two solutions for my need :

1. XAMPP ( http://www.apachefriends.org/en/xampp.html)
2. WAMP (http://www.wampserver.com/en/)

XAMPP has two version :

Full and lite version

Full version has following feature :

  • Apache
  • MySQL
  • PHP + PEAR
  • MiniPerl
  • OpenSSL
  • phpMyAdmin
  • XAMPP Control Panel
  • Webalizer
  • Mercury Mail Transport System
  • FileZilla FTP Server
  • SQLite
  • ADODB
  • Zend Optimizer
  • XAMPP Security

Plus other “important feature” for installation

  1. Method A: Installation with the Installer
  2. Method B: “Installation” without the Installer

Full version is my choice since it come with PHP4 and PHP5

Lite version come with PHP5 and no PHP4

WAMP is great too , almost same as XAMPP BUT I have to install it to my computer

Since I must doing presentation to friends, my boss etc . I choose to use XAMPP because it’s portable , can reside in my Flash disk .

Draw back of these installer for me is MYSQL version .
I’m a fan of MYSQL 4.0x since my hosting company still use it in production .

But later I’ll switch to MYSQL4.1 or MYSQL 5 which is recomended by MYSQL AB company .

I’ll explore interesting facility in XAMPP like Mercury Mail Transport System for mail(), how to use it in local environtment etc.

See you