Thursday, December 20, 2007

Show Desktop missing?

Show Desktop
After opening hundreds of windows and you want to desperately do something with your desktop, you have to go on minimizing all the windows. This is where the Show Desktop is used. For those who have not seen it, it is there in the quick launch section of the Task Bar.



And for the more unlucky guys who have not enabled the quick launch, a google search would be more than enough to know more.

And for the lucky guys like me, who occassionally find it interesting to accidently delete files ;), here is the Show Desktop file
Filename : Show Desktop.scf
Contents ...

[Shell]
Command=2
IconFile=explorer.exe,3
[Taskbar]
Command=ToggleDesktop

Saturday, December 8, 2007

Virtual Hosts on Apache 2.2.6 [Windows]

What ?
Virtual Hosts allow you to simulate multiple sites on a single server.
i.e, One Server many Websites.
Virtual Hosts is enabled by uncommenting the line :


# Virtual hosts
#Include conf/extra/httpd-vhosts.conf #Uncomment this line

on httpd.conf

The virtual host conf file ./conf/extra/httpd-vhosts.conf

Eg:

#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#
NameVirtualHost *:80

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#

<VirtualHost *:80>
ServerName localhost
DocumentRoot "F:/webs/localhost"
DirectoryIndex index.php index.html index.htm index.shtml
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "F:/webs/kitiyo.com"
ServerName pp.com
DirectoryIndex index.php index.html index.htm index.shtml
</VirtualHost>


In the above example shows localhost and kitiyo.com host on same server.
Remember to add the sites in the hosts file.

Apache 2.2.6 Getting 403 Forbidden on all pages

Intro
This is the issue about getting 403 Forbidden Error on all pages when you are working on localhost. I have used Virtual Host to simulate multiple sites on my computer. So I get 403 Forbidden on all pages. I tried for many solutions couldn't find anything much relevant. After sometime tweaking here is the solution or rather the problem I found.

...
The error forbidden arises due to


<Directory Directory Path, eg C:/www/>
# many things here ... :)
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all

</Directory>


If you have virtual hosts, you will have to allow permission to access those directories too which contain the sites. For eg. if you have another site on
C:/anotherwww/, you should include

<Directory Directory Path, eg C:/anotherwww/>
Options Indexes FollowSymLinks

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all

</Directory>


Thats all
Restart Apache Server.
Your Problem is solved.

:)