XAAMP Setup Local Virtual Host...

Posted on 2006-05-22
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
    LVL 4

    Accepted Solution


    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

    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  ...


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Suggested Solutions

    Title # Comments Views Activity
    Back up solutions without breaking the bank 17 55
    Problem to go to page 12 56
    phpPgAdmin problem 14 44
    restoring image to a different pc 20 83
    How to update Firmware and Bios in Dell Equalogic PS6000 Arrays and Hard Disks firmware update.
    Create your own, high-performance VM backup appliance by installing NAKIVO Backup & Replication directly onto a Synology NAS!
    The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
    The viewer will learn how to start File History, a MACINTOSH like backup utility built into windows 8, on your Windows 8 computer. To open the File History control panel swipe from the right  side to get the search menu or position the cursor in the…

    760 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

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now