Error occur when using virtual directory

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Error occur when using virtual directory

Postby andrewchan1985 » 19. October 2009 16:08

Dear all,

i dun't how to solve the problem, Could anyone help me,

Information
Windows XP SP3
XAMPP 1.7.2

Error Information

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.

[http.conf]

ScriptAlias /phpdev/ "D:/apps/PHP"
<Directory "D:/apps/PHP">
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>

Please help, thanks a lot ....

Best Regards

andrew
andrewchan1985
 
Posts: 3
Joined: 19. October 2009 15:56

Re: Error occur when using virtual directory

Postby Nobbie » 19. October 2009 20:22

andrewchan1985 wrote:I dun't how to solve the problem, Could anyone help me,


Which problem?
Nobbie
 
Posts: 8768
Joined: 09. March 2008 13:04

Re: Error occur when using virtual directory

Postby andrewchan1985 » 20. October 2009 02:46

Access Denial problem,

i have been set the file permission to Everyone with full control
andrewchan1985
 
Posts: 3
Joined: 19. October 2009 15:56

Re: Error occur when using virtual directory

Postby Izzy » 20. October 2009 02:59

You didn't post what you had typed in the address bar of your browser that gave the access forbidden error message.


First delete your entry in the httpd.conf file.

Next open the httpd-xampp.conf file in the extra folder.

You will see other Alias Directives in there.

Below the phpmyadmin Alias add your entry but use Alias not ScriptAlias
(unless the PHP folder contains CGI scripts that will be processed by mod_cgi's cgi-script handler, I am assuming that it does not)
for example:
Code: Select all
Alias /phpdev "D:/apps/PHP"
<Directory "D:/apps/PHP">
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>

Save the httpd-xampp.conf file and restart Apache to have your edits recognised - see how that goes and a tip when developing at localhost level, clear your browser's cache frequently and in particular if you get unexpected issues.

Also make sure there is no .htaccess file in the D:\apps\PHP folder that may be overriding your Apache server configuration files.

Some reading to help with defining the differences between Directives Alias and ScriptAlias:
http://httpd.apache.org/docs/2.2/mod/mo ... criptalias
http://httpd.apache.org/docs/2.2/mod/mo ... html#alias
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 95 guests