Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

localhost structure

localhost structure

localhost structure

I submitted a question back a long time ago about setting up an apache localhost for perl & mysql testing on my home computer before I run on a real server. Xampp was recommended and I got it, installed it but then was off on another project before I got it running. I am back now and have one question from those that have used this program set up. Where do I place my www & cgi-bin folders for my html & Perl programs?
Do I just place the two folders & their program components us sub folders in the c:\ localhost folder?

Thanks in advance for any feed back.

Computer thought: I teach a lot of programming so I can learn. You can never learn it all.  

RE: localhost structure

I don't think there are any hard and fast rules but some structure makes finding you files easier in the future.
Mine on a windows box is

         ... files
         ... files
         ... files

MySQL is in program files


RE: localhost structure

In Apache's configuration look for the DocumentRoot, this is where your www files will be located.

There's one global/default docroot, and then (if you have VirtualHosts set up for hosting multiple sites on different domains on the same server), each VirtualHost will probably have its own document root.


DocumentRoot /var/www/html

<Directory /var/www/html>
   Options Indexes Includes ExecCGI
   AllowOverride None
   Order allow,deny
   Allow from all


NameVirtualHost *:80

<VirtualHost *:80>
   ServerName www.mydomain.com
   ServerAlias mydomain.com *.mydomain.com
   DocumentRoot /home/mydomain/public_html
   <Directory /home/mydomain/public_html>
      Options Indexes Includes ExecCGI
      AllowOverride None
      Order allow,deny
      Allow from all

These are common paths for a unix apache server but you get the idea.

You'll need a <Directory> block like those shown to set up what the settings and permissions are for the directory. ExecCGI allows perl/cgi scripts to be executed anywhere and not only in the cgi-bin.

Apache usually has a default Alias directive for /cgi-bin/, so search the config for that too and change that to where you want it to be.

Kirsle.net | My personal homepage


perl -e '$|=$i=1;print" oo\n<|>\n_|_";x:sleep$|;print"\b",$i++%2?"/":"_";goto x;'

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close