Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-14-2013, 02:37 PM   PM User | #1
alank2
New Coder

 
Join Date: Jun 2012
Posts: 25
Thanks: 4
Thanked 0 Times in 0 Posts
alank2 is an unknown quantity at this point
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
alank2 is offline   Reply With Quote
Old 02-14-2013, 02:44 PM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,635
Thanks: 4
Thanked 2,448 Times in 2,417 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
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.
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
Fou-Lu is offline   Reply With Quote
Old 02-14-2013, 02:53 PM   PM User | #3
alank2
New Coder

 
Join Date: Jun 2012
Posts: 25
Thanks: 4
Thanked 0 Times in 0 Posts
alank2 is an unknown quantity at this point
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
alank2 is offline   Reply With Quote
Old 02-14-2013, 03:20 PM   PM User | #4
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,635
Thanks: 4
Thanked 2,448 Times in 2,417 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
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?
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
Fou-Lu is offline   Reply With Quote
Old 02-14-2013, 03:48 PM   PM User | #5
alank2
New Coder

 
Join Date: Jun 2012
Posts: 25
Thanks: 4
Thanked 0 Times in 0 Posts
alank2 is an unknown quantity at this point
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
alank2 is offline   Reply With Quote
Old 02-14-2013, 07:04 PM   PM User | #6
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,635
Thanks: 4
Thanked 2,448 Times in 2,417 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
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>
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
Fou-Lu is offline   Reply With Quote
Users who have thanked Fou-Lu for this post:
alank2 (02-14-2013)
Old 02-14-2013, 07:19 PM   PM User | #7
alank2
New Coder

 
Join Date: Jun 2012
Posts: 25
Thanks: 4
Thanked 0 Times in 0 Posts
alank2 is an unknown quantity at this point
Hi Fou-Lu,

Thank you - that fixed it!!

Alan
alank2 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:42 PM.


Advertisement
Log in to turn off these ads.