Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alias 403 Forbidden with Apache

I'm trying to create a folder named week7 and an html page named hello.html in that folder outside the document root and have it viewed through an Alias directive.

I created a folder named week7 out of the Document Root. I chose this location for it:

/usr/local/www/week7 

while my document root is:

/usr/local/www/apache22/data 

in httpd.conf and under tag, I wrote:

    Alias /week7 /usr/local/www/week7 <Directory /usr/local/www/week7>     Require all granted </Directory> 

After rebooting the server, I got the following message: Forbidden 403 message.

I tried changing permissions for the hello.html file, the week7 folder and even the www folder and nothing changed.

Any ideas?

like image 801
Yousif Avatar asked Jun 26 '12 20:06

Yousif


People also ask

What is 403 Forbidden And how do you fix it?

A 403 error occurs when a server won't allow you to access a webpage. You can't always fix a 403 error on your own, but simple tricks like refreshing your page or clearing your cache could help. If visitors to your webpage are getting 403 errors, you may have to reconfigure it.


1 Answers

If you're using apache 2.4

Order allow,deny
Allow from all

becomes...

Require all granted

https://httpd.apache.org/docs/2.4/upgrading.html

like image 76
user1585789 Avatar answered Sep 21 '22 11:09

user1585789