Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New Coder
    Join Date
    Jun 2012
    Posts
    25
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Trying to get an alias to work in xampp...

    Hi,

    I added this to the configuration file:

    Code:
    Alias /sources "D:/5"
    
    <Directory "D:/5">
    	Options Indexes FollowSymLinks Includes ExecCGI
    	AllowOverride All
    	Order allow,deny
    	Allow from all
    </Directory>
    But when I try to browse it, I get:

    Code:
    Access forbidden!
    
    You don't have permission to access the requested object. It is either read-protected or not readable by the server.
    
    If you think this is a server error, please contact the webmaster.
    Any ideas?

    Thanks,

    Alan

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    Not sure why this is in the PHP section as it has nothing to do with PHP.
    Since the error is a forbidden and not a not found, that would indicate to me that you have a security issue. Make sure the apache user has access to the resources for D:\5.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #3
    New Coder
    Join Date
    Jun 2012
    Posts
    25
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Hi,

    I didn't know where to put it - I did a search and found others asking questions about xampp in this forum...

    I am running xampp on windows - it does say : "Running with Administrator rights - good!" in the control panel.

    Thanks,

    Alan

  • #4
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    Running the application as administrator isn't necessarily the same as the user that is used for the access for the account. You need to ensure that the directory can be accessed by the user specified in the apache service.
    What is the D drive? Is it local or drive mapped?
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #5
    New Coder
    Join Date
    Jun 2012
    Posts
    25
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Hi,

    I set the Apache service to use a local administrator that I know has access and restarted it. Same error. D:\5 is a local drive.

    Any other ideas?

    Thanks for the help!

    Alan

  • #6
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    Mmm, wait, what version of apache are you using?
    I just noticed you're using Order allow,deny. The new directive is the require, but I don't know exactly what version released it. Try this for the directory block:
    Code:
    Alias /sources "D:/5"
    
    <Directory "D:/5">
    	Options Indexes FollowSymLinks Includes ExecCGI
    	AllowOverride All
            Require all granted
    </Directory>
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • Users who have thanked Fou-Lu for this post:

    alank2 (02-14-2013)

  • #7
    New Coder
    Join Date
    Jun 2012
    Posts
    25
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Hi Fou-Lu,

    Thank you - that fixed it!!

    Alan


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •