XAAMP Setup Local Virtual Host...

Posted on 2006-05-22
Medium Priority
Last Modified: 2013-11-18
I'm trying to setup a local host so I can run my website off the local server.  The problem is this:

http://localhost/versa/ <-- I type into browser

C:\Program Files\xampp\htdocs\versa  <-- Name of the folder where the files are stashed

The problem is the index.php will load.. but the <path> variable points to http://localhost/ not localhost/versa so the css, links, ect don't work.


<link type="text/css" rel="stylesheet" href="http://localhost/css/mainpages.css" /> <-- Taken from view source command in browser

I thought the virtiual host should be setup this way in the apache file.

DocumentRoot C:\Program Files\xampp\htdocs\versa

Any thoughts on why this might not be working?

Question by:cstormer
1 Comment

Accepted Solution

Tol_cv earned 2000 total points
ID: 16788877

1) setup in xampp httpd.conf


#  General setup for the virtual host

DocumentRoot "C:\Program Files\xampp\htdocs\versa "
ServerName localhost_versa # or whatever you like there ......

ErrorLog   "C:\Program Files\xampp\logs\error_log"
TransferLog "C:\Program Files\xampp\logs\access_log"

DirectoryIndex index.php index.html index.htm

<Directory "C:\Program Files\xampp\htdocs\versa\">
        AllowOverride None
        Options IncludesNoExec
        AddOutputFilter Includes html
        AddHandler type-map var
        Order allow,deny
        Allow from all
        LanguagePriority en es de fr
        ForceLanguagePriority Prefer Fallback

# Where to find workers.properties

make sure that log files path exists.

2) add in c:\WINDOWS\system32\drivers\etc\hosts localhost   localhost_versa
where  localhost_versa is the serverName used in httpd.conf.
then you can type in browser: http://localhost_versa  ...


Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The article will include the best Data Recovery Tools along with their Features, Capabilities, and their Download Links. Hope you’ll enjoy it and will choose the one as required by you.
The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question