Page 1 of 1

Error occur when using virtual directory

PostPosted: 19. October 2009 16:08
by andrewchan1985
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

Re: Error occur when using virtual directory

PostPosted: 19. October 2009 20:22
by Nobbie
andrewchan1985 wrote:I dun't how to solve the problem, Could anyone help me,


Which problem?

Re: Error occur when using virtual directory

PostPosted: 20. October 2009 02:46
by andrewchan1985
Access Denial problem,

i have been set the file permission to Everyone with full control

Re: Error occur when using virtual directory

PostPosted: 20. October 2009 02:59
by Izzy
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