Page 2 of 2 First 12
  • Jump to page:
    #16
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Posts
    117
    Rep Power
    11
    I re-installed xampp and it worked. I went to control panel and started the service. I clicked on admin and I got a default web page. I add

    <VirtualHost *>
    ServerName www.otuatail.co.uk
    ServerAlias otuatail.co.uk
    DocumentRoot "www.otuatail.co.uk"

    <Directory "E:/xampp/htdocs/otuatail.co.uk">
    # allow access by default
    Order deny,allow
    </Directory>
    </VirtualHost>

    to httpd-vhosts.conf

    Now it is broken. I get

    Access forbidden!

    You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.

    If you think this is a server error, please contact the webmaster.

    Error 403

    localhost
    Apache/2.4.4 (Win32) OpenSSL/1.0.1e PHP/5.5.3

    Complete host =

    # Copyright (c) 1993-2009 Microsoft Corp.
    #
    # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
    #
    # This file contains the mappings of IP addresses to host names. Each
    # entry should be kept on an individual line. The IP address should
    # be placed in the first column followed by the corresponding host name.
    # The IP address and the host name should be separated by at least one
    # space.
    #
    # Additionally, comments (such as these) may be inserted on individual
    # lines or following the machine name denoted by a '#' symbol.
    #
    # For example:
    #
    # 102.54.94.97 rhino.acme.com # source server
    # 38.25.63.10 x.acme.com # x client host

    # localhost name resolution is handled within DNS itself.
    127.0.0.1 www.otuatail.co.uk
    127.0.0.1 otuatail.co.uk
    # ::1 localhost


    AND complete httpd-vhosts.conf =

    # Virtual Hosts
    #
    # Required modules: mod_log_config

    # 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.4/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>
    ##ServerAdmin webmaster@dummy-host.example.com
    ##DocumentRoot "E:/xampp/htdocs/dummy-host.example.com"
    ##ServerName dummy-host.example.com
    ##ServerAlias www.dummy-host.example.com
    ##ErrorLog "logs/dummy-host.example.com-error.log"
    ##CustomLog "logs/dummy-host.example.com-access.log" common
    ##</VirtualHost>

    ##<VirtualHost *:80>
    ##ServerAdmin webmaster@dummy-host2.example.com
    ##DocumentRoot "E:/xampp/htdocs/dummy-host2.example.com"
    ##ServerName dummy-host2.example.com
    ##ErrorLog "logs/dummy-host2.example.com-error.log"
    ##CustomLog "logs/dummy-host2.example.com-access.log" common
    ##</VirtualHost>


    <VirtualHost *>
    ServerName www.otuatail.co.uk
    ServerAlias otuatail.co.uk
    DocumentRoot "www.otuatail.co.uk"

    <Directory "E:/xampp/htdocs/otuatail.co.uk">
    # allow access by default
    Order deny,allow
    </Directory>
    </VirtualHost>

    I am confused. Let me reiterate www.otuatail.co.uk is NOT a REAL website I made it up it should be a virtual website that is local.

    I NOW find this
    I have a default splash.php this has the virtual location -> http://localhost/xampp/splash.php
    This exists here -> E:\xampp\htdocs\xampp\splash.php

    I have searched all the configs within xampp and this is not changeable in any way shape or form and I cant change splash.php to index.php
    I have searched the registry for splash.php. Can't find this. It appears this is embedded in some exe file and is fixed as is the default location of the home page and loacal site. This is crap.
    Last edited by Otuatail; October 25th, 2013 at 05:48 AM.
  2. #17
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2009
    Location
    Nebraska, USA
    Posts
    875
    Rep Power
    275
    Don't worry about the xampp folder inside of the htdocs folder, or anything inside of it.

    It "broke" because you used a wrong entry for your virtualhost DocumentRoot.

    Here is what you need to do to get things working, step-by-step:

    Assuming xampp is in a working condition again [you removed the code that broke it from httpd-vhosts.conf],

    1. your host file looks fine , although, I would probably add another line for localhost
    Code:
    127.0.0.1 localhost
    because I've seen where Win7 doesn't "know" what localhost means without it.

    2. replace all the code you put in the httpd-vhosts.conf file with the following:
    Code:
    NameVirtualHost *:80  # needed for name-based virtualhosts
    
    <VirtualHost *:80> # will make it work with only port 80
        ServerName www.otuatail.co.uk
        ServerAlias otuatail.co.uk
        ServerAdmin "webmaster@otuatail.co.uk"
        DocumentRoot "E:/xampp/vhosts/otuatail.co.uk"
        DirectoryIndex index.php index.html info.php
        <Directory "E:/xampp/vhosts/otuatail.co.uk">
            # allow access by default
            Order deny,allow
        </Directory>
    </VirtualHost>
    3. create a new folder under "E:\xampp" called vhosts

    4. inside the new folder "vhosts", create a new folder called otuatail.co.uk

    5. inside the new folder "otuatail.co.uk", create a file called info.php

    6. inside this new file "info.php", place the following code
    Code:
    <?php phpinfo(); ?>
    and save that file.

    7. start up the xampp control center and start apache2...if apache2 was already running, stop it and then restart it again [for the changes to take place ]

    8. open a browser, and goto otuatail.co.uk or www.otuatail.co.uk, if everything went correctly, you should see a webpage showing your version of PHP with all of its settings.

    9. if you still get the "forbidden" message [which you should not], try using "http://www.otuatail.co.uk/info.php" in the browser.

    10. if things still don't work correctly, you may need to place another "default" VirtualHost entry pointing to the htdocs folder above the existing VirtualHost directive. If thats the case, I can show you what to put for it....but, try all of the above first.
    Last edited by DonR; October 25th, 2013 at 03:23 PM.
Page 2 of 2 First 12
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo