directory aliase not working
Posted by: dovk179 (---.hsd1.ct.comcast.net)
Date: July 31, 2014 11:26PM

Hi, I use wampserver with apache 2.4.9, php 5.5.12 and mysql 5.6.17 on windows 7 platform.
the system funtions ok using the WWW root but trying to use the aliase directory it gives me the Forbidden error message.
You don't have permission to access /webapp/index.php on this server
I read lots of sugestions on line but didnot work for me.
I wonder if soneone is willing to take a look at my files. here is the phpsysinfo.conf that shows the path.

Alias /phpsysinfo "c:/wamp/apps/phpsysinfo3.1.12/"

<Directory "c:/wamp/apps/phpsysinfo3.1.12/">
Options Indexes FollowSymLinks
AllowOverride all
<IfDefine APACHE24>
Require local
</IfDefine>
<IfDefine !APACHE24>
Order Deny,Allow
Deny from all
Allow from localhost ::1 127.0.0.1
</IfDefine>
</Directory>

and the webapp.conf

Alias /webapp/ "c:/mywebapp/"

<Directory "c:/mywebapp/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
Allow from all
</Directory>

Options: ReplyQuote
Re: directory aliase not working
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: August 01, 2014 10:34AM

Well that looks correct to me, just created one here and got exactly the same result and it runs.

Can I check that you are using 'localhost/webapp' (without the quotes) to access the alias?

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: directory aliase not working
Posted by: dovk179 (---.hsd1.ct.comcast.net)
Date: August 01, 2014 03:59PM

using wampserver as -> ‘start as administrator‘
the helloworld.php is:
<?php
echo "<h1>Hello World<?h1>"
?>

and the index.php is
<?php
phpinfo();
?>

and on the browser:
[localhost]
[localhost]
and the return is
Forbidden
You don't have permission to access /webapp/index.php on this server
You don't have permission to access /webapp/helloworld.php on this server.
Apache/2.4.9 (Win32) PHP/5.5.12 Server at localhost Port 80

can I send you the phpinfo() and may be othere configuration files in order to see where is the configuration error?

thanks alot
Dov Kruman

Options: ReplyQuote
Re: directory aliase not working
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: August 01, 2014 05:29PM

Yea go ahead, send it as a Private Message rather than bloat this thread.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: directory aliase not working
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: August 02, 2014 06:41PM

Point 1:
You dont need, and should not start WAMPServer using the Adminstrator account.
Just double click the icon and answer Yes to the dialog.


Point 2:
I tlooks like youhave put your test files in a folder C:/webapp/....

This is a fine idea, but you have to tell Apache that it is allowed to server from that location.

Your best idea is to create a Virtual Host, as a Virtual Host can be placed anywhere on the file system.


See ths document to tell you how to create a virtual host. WAMPServer 2.5 The Homepage, Your Projects Menu and the need for Virtual Hosts

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote


Sorry, only registered users may post in this forum.