Archive for April, 2005

Configuring CGI for Apache on Windows

Thursday, April 28th, 2005

Ref: http://kadaitcha.cx/apache_and_perl.html

Make sure the script interpreter path is set to
X:/Perl/bin/perl.exe

Also make sure that the cgi-bin entry in httpd.conf DOES HAVE a trailing / (SLASH).

Configuring User Directories with CGI Scripting in Apache

Tuesday, April 19th, 2005

Objective:
Each user must be able to execute cgi scripts from within their home directories.
~/public_html/cgi-bin

References:
http://httpd.apache.org/docs-2.0/howto/cgi.html
http://cri.ch/linux/docs/sk007.html

First, change the httpd.conf to point to the cgi-bin directory to the user’s public directory.
ScriptAlias /cgi-bin/ /home/*/public_html/cgi-bin/

/home/*/public_html/cgi-bin>
AllowOverride None
Options +ExecCGI +Includes +Indexes
Order allow,deny
Allow from all

AddHandler cgi-script .cgi .sh .pl

—–
1. Set the permissions for directories.

/home/ must have 711 permissions
/home/public_html must have 755 permissions
and all files in public_html must be world-readable.

2. Activate the ~user directories

Edit httpd.conf.
- UserDir for user root:
UserDir disabled root
- UserDir is defined as public_html

Note:
Do 3.a. only if you want to set it for a single user.
For multiple users, you need to configure each ScriptAlias separately.
In such a case, it is better to use 3.b.

3. a. Define a ScriptAlias
ScriptAlias /~sven/cgi-bin “/home/sven/public_html/cgi-bin/”

3.b. Add the Option ExecCGI
The option ExecCGI can be defined at a level in httpd.conf.

Following definition gives each user to run cgi-scripts from his ~/cgi-bin directory:

/home/*/public_html/cgi-bin>
AllowOverride None
Options +ExecCGI +Includes +Indexes
Order allow,deny
Allow from all

Errors that might occur: (and it did for me, for a most stupid reason – ME)

Premature end of script headers

Short answers:
1. Check the execute permission of the script.
2. Deactivate or rename suexec.

Detailed explanation:
http://httpd.apache.org/docs-2.0/howto/cgi.html

Log files:

/var/log/httpd/error_log
/var/log/httpd/suexec.log

Commands:
apachectl -V
apachectl restart

Debian: Configuring X

Monday, April 11th, 2005

commands:
dexconf – Stands for Debian X Configuration Tool
dpkg-reconfigure xserver-xfree86

Debian: Configuring the time and timezone

Monday, April 11th, 2005

While doing an upgrade from woody to sarge (by adding a new source to the /etc/apt/sources.list),
the install process showed me the current time (which was an hr behind) and asked me to run
tzconfig in order to configure the time.

Debian: Configuring the network

Sunday, April 10th, 2005

After configuring the module (as explained in the prev post), it is time to configure the card.
I found this great link explaining the Debian install (complete with screenshots)

Since I am on DHCP, I just edited the /etc/network/interfaces file and added this:

auto eth0iface eth0 inet static

Then, I restarted the network:
/etc/init.d/networking restart

A quick ifconfig showed that the IP had been acquired.
A ping took about 2-3 secs before it responded, but it was all OK!

netstat -r showed the routing table. The gateway was set and so was I !!!

Configure modules in Debian

Sunday, April 10th, 2005

After unsuccessfully trying to install FreeBSD 5.2/5.3 on the P-133Mhz,
I installed Debian. But during the install process, I could not detect the network card in the modules list and skipped selecting any driver.

After the install, I spent a good amount of time trying to get the same configuration screen.
I had used lspci or something to get the name and model number of the card.
So now I wanted to go and install the relevant drivers (if they were there).

Linksys LNE100TX (Linksys EtherFast 10/100)
For some reason, this was also shown: Lite-On Communications Inc.
IRQ 10, I/O ports at fc100.

The command, you have all been waiting for, is: modconf (thunderous applause).

The installer, when I entered the network configuration (the IP addr, etc), showed the interface as Intel-something. Probably was showing me what the compatible chipset or something was.

The Linksys website shows that the tulip driver is the driver for this card.

Update: Using the tulip driver in modconf installed the card successfully.
Now need to go and configure the card.