Reflections of a scattered Mind !!

"Not all scattered pieces are of broken glass"

Follow me on TwitterRSS Feeds

  • Home
  • My Announcement
  • My Experiences
  • Technical
  • TimePass
  • Tutorial

Subdomains on localhost

Sep 19th

Posted by Sai Prasad in Technical

No comments

Intro
Developing websites on localhost may sometimes need making of sub domains. Installing and running another server for this purpose is useless, consumes more resources etc. So here is the technique to make sub domains on localhost.

You can also use this to host more than one site on localhost. i.e, you can host multiple sites situated on different folders.

PS: This is for Apache configuration.

Steps

First decide on the subdomain names…
for eg: sub.localhost, sub2.localhost, alt.localhost , images.localhost etc..
You can also name www.name.com. (Please note that if there is a site with that name on the net, you wont be able to access that site on the internet.)

Second making these sites to point to 127.0.0.1, for this you can edit the HOSTS file on windows. The HOSTS file found on Windows (and linux too) is like a local DNS (domain name server). When you type a url on the browsers address bar, the domain name is converted to the IP of the server by a DNS lookup by the browser. Now here is the catch … Windows first looks at the HOSTS file before doing any DNS lookup. So we can block certain sites by editing the HOSTS file.

HOSTS file is found typically here …

Windows XP : C:\WINDOWS\SYSTEM32\DRIVERS\ETC
Windows 2K : C:\WINNT\SYSTEM32\DRIVERS\ETC
Windows 98/ME : C:\WINDOWS

Linux : /etc/

The Lines followed by a # are comments and explains how to use the HOSTS file.127.0.0.1 is the IP address that is used to loopback to your computer itself.

Now add to HOSTS line
127.0.0.1 <hostname>
Egs:
127.0.0.1 sub.localhost
127.0.0.1 sub1.localhost
127.0.0.1 sub2.localhost
127.0.0.1 images.localhost
127.0.0.1 mysiteonmycomp.com
127.0.0.1 images.mysiteonmycomp.com

Next we have to assign each of these different URL’s to different folders.
This is done on the apache conf file. (httpd.conf file situated in apache\conf\ directory).
Note that if you are using XAMPP, the virtual hosts file is at apache\conf\extra\httpd-vhosts.conf

Scroll all the way down the httpd.conf file until you reach about Virtual Hosts.
Add for each domain (or subdomain)

NameVirtualHost <sitename>:80

<virtualhost <sitename>:80>
ServerName <sitename>
DocumentRoot DocumentRoot-see example
DirectoryIndex index.php index.html index.html index.htm index.shtml
</VirtualHost>
You can also any valid extra parameters also (like ServerAdmin, ServerAlias etc.)

eg:

NameVirtualHost saiprasad.com:80
<virtualhost saiprasad.com:80>
ServerAdmin webmaster@localhost
DocumentRoot “C:/xampp/htdocs/www”
ServerName saiprasad.com
ServerAlias www.saiprasad.com
</virtualhost>

NameVirtualHost test.saiprasad.com:80
<virtualhost test.saiprasad.com:80>
ServerAdmin webmaster@myjoomlasite.com
DocumentRoot “C:/xampp/htdocs/test”
ServerName test.saiprasad.com
</virtualhost>

NOTE : All the DocumentRoots must be under the DocumentRoot (i.e; must be a sub-directory) specified in httpd.confd.
For example, in XAMPP, the default DocumentRoot is “C:/xampp/htdocs”. Therefore, the DocumentRoot of any virtual host cannot be given as : “C:/xampp/test”. The folder must be under “C:/xampp/htdocs”.

webdev, xampp

Microsoft can’t explain!!

Aug 30th

Posted by Sai Prasad in Technical

2 comments

Here are some of the bugs in the Microsoft software, which are commonly used. As far as I know, Microsoft did not give any explanation for the origin of these bugs.

———— ——— ——— ——— ——— ———

BUG #1
An Indian discovered that nobody can create a FOLDER anywhere on the computer which can be named as “CON”. This is something pretty cool…and unbelievable. .. At Microsoft the whole Team, couldn’t answer why this happened!

TRY IT NOW ,IT WILL NOT CREATE “CON” FOLDER

———— ——— ——— ——— ——— ———

BUG #2
For those of you using Windows, do the following:

  • Open an empty notepad file
  • Type “Bush hid the facts” (without the quotes)
  • Save it as whatever you want.
  • Close it, and re-open it.

is it just a really weird bug? Confused?

———— ——— ——— ——— ——— ———

BUG #3

This is something pretty cool and neat…and unbelievable. .. At Microsoft the whole Team, including Bill Gates, couldn’t answer why this happened!

It was discovered by a Brazilian. Try it out yourself…

Open Microsoft Word and type

=rand (200, 99)

And then press ENTER

microsoft

Parallel Programming Minor Test – I

Aug 30th

Posted by Sai Prasad in Academics

2 comments

Date : 29.08.2008
Duration : 40 Minutes
Max. Marks : 10

1. Give a CREW PRAM algorithm to merge two sorted lists.

2. Define shuffle and exchange connections in a shuffle-exchange network. Prove that if a shuffle link connects nodes i and j, then j is single-bit left cyclic rotation of i.

3. What is the average number of communication links in the use during Johnsson and Ho’s one-to-all broadcast algorithm on the hypercube?

Minor, NITW, Parallel Programming

Google visit to NIT Warangal

Aug 30th

Posted by Sai Prasad in NITW

No comments

Sub : For the selections of 1) Campus Ambassador, 2) Women in Engineering Award

Campus Ambassador :

Date : 4th September, 2008 2:00 PM IST
Venue : Conference Hall, NIT Warangal
Duration of Selection Process : 4 hours
Process :

  1. Presentation on campus
  2. Application + Resume Screening
  3. Group Discussion.
  4. Personal Interview

Ambassador Requirements :

  1. 3rd and 4th year students from Computer Science Stream only
  2. CGPA of 7.5 and above
  3. Involvement in various co-curricular activities on and off campus

Ambassador Responsibilities :

  1. Serve as strategic link between the campus and Google India
  2. Identify mutually beneficial sponsorship opportunities
  3. Maintain open and regular communication with the student council and career placement cell; help enhance Google’s visibility on campus

Women in Engineering Award :

The Google India Women in Engineering Award is aimed at recognizing and rewarding deserving women students in Computer Science, inspiring them to become active participants and leaders in the field of technology.

The award will be given to deserving students based on demonstrated leadership, academic excellence and thought. A group of female bachelor’s, master’s and Ph.D student finalists will be chosen from the applicant pool. The award recipients will each receive a sum of INR 75,000.

Eligibility criteria for the award :
Candidates must -

  1. be enrolled as full time students in a recognized university.
  2. maintain a CGPA of at least 8.00
  3. be enrolled in 2nd, 3rd or final year if applying during their bachelor’s degree, 1st or 2nd year if applying when pursuing a master’s degree, or be PhD students in a related field.

Duration : 1 hour for the presentation

NOTE : Eligible and interested students are requested to submit the hard copies of the resumes to the T & P office on or before 2nd September, 2008.

google

Got the ‘App’titude Challenge from Google, India

Aug 27th

Posted by Sai Prasad in Uncategorized

No comments

Google India and Faculty of Management Studies, University of Delhi has come forward with “Got the ‘App’titude Challenge”. This unique, first time effort is looking for student, faculty and alumni leaders to implement Google Apps within their respective campuses, with the objective of providing access to powerful communication methods, and improving collaboration capabilities through tools like Gmail, shareable calendars, online spreadsheets and online documents.

In addition to the challenge being unique learning opportunity for students, it will also show them to exercise and hone their research, communication and negotiation skills in a real time situation, since they will be required to develop and execute a product positioning and marketing plan for a targeted audience in order to implement Google Apps at your campus.

In order to participate in the challenge, students, faculty and alumni are encouraged to form teams and follow the guidelines mentioned below:

  1. Sign up for the challenge by September 15, 2008.
  2. Get approval from the college’s administration to implement Google Apps by October 15, 2008.
  3. Work with the college IT department to implement Google Apps by December 15, 2008.
  4. Achieve the highest level of Google Apps usage among all participating colleges by January 31, 2009 to be declared the challenge winner!

In case of any queries please visit the Got the “App”titude website or feel free to write into the team at admin@GotTheAptitude.com.

Regards,
Sai Prasad Ch
saiprasad.ch@gmail.com
http://csprasad.blogspot.com

google
« First...«23456»...Last »
    • Recent comments
    • Archives
    • Tags
    • Categories
    • Academics (3)
    • My Experiences (11)
    • NITW (1)
    • Technical (10)
    • TimePass (5)
    • Tutorial (2)
    • Uncategorized (6)
    Academics android avatar Bangalore benefits blog c++ display image Dojo failure files google gtalk html IBM ISL ideas IM Internship Javascript just friends microsoft Minor NITW novels Parallel Programming quotes Results review saionline Salary Semester Technozion telugu torrents webdev xampp yahoo
    • August 2010 (1)
    • July 2010 (1)
    • June 2010 (1)
    • February 2010 (1)
    • December 2009 (1)
    • November 2009 (1)
    • October 2009 (2)
    • September 2009 (1)
    • August 2009 (1)
    • July 2009 (1)
    • May 2009 (2)
    • April 2009 (1)
    • September 2008 (2)
    • August 2008 (5)
    • June 2008 (3)
    • May 2008 (1)
    • April 2008 (2)
    • January 2008 (5)
    • May 2006 (1)
    • April 2006 (1)
    • Roman Tronenko: This post is great! I can say it almost summarized all my experiences I had last several months...
    • Sai Prasad: Got the domain name from Webcom Systems. They charge < Rs. 1000/- per annum. I did not buy any...
    • Sasidhar Kasturi: Sai, From which site you got the domain for cheap? (I am planning to buy one). And where are...
    • Sai Prasad: @Sharad: Maybe even 9th graders in Kolkata know it... but I still do not know the reason behind...
    • Sharad: Come on sai you shouldnt be misguiding readers saying "Microsoft can't explain" these simple tricks...
  • My latest tweets

    Loading tweets...
    Follow me on Twitter!
RSS Feeds XHTML 1.1 Top