Amazon EC2 Apache Symbolic Link Not Allowed

I have created an Amazon EC2 instance and installed Apache and PHP on it:

$ sudo yum install apache2
$ sudo yum install php
$ ls -al /var/www/services/
lrwxrwxrwx 1 root root   42 Jun 22 21:13 production -> /home/ec2-user/services

The I have created new VirtualHost:

<VirtualHost *:80>
    ServerName ec2-***
    DocumentRoot "/var/www/services/production/public"

    <Directory "/var/www/services/production/public">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride All
        Order deny,allow
        Allow from all

Now, when I run my request in the browser, it says 403 Forbidden and the log shows symlink problem:

[Wed Jun 22 21:14:19 2011] [error] [client ***] Symbolic link not allowed or link target not accessible: /var/www/services/production
[Wed Jun 22 21:14:20 2011] [error] [client ***] Symbolic link not allowed or link target not accessible: /var/www/services/production

What's wrong? Is EC2 blocking symlinks? Please help!



Now, the only problem I could think of is permission to access production by apache user. Make sure the permission to /var/www/services/production (& the target folder) folder is set to 0755 on both symbolic links & target folder.

Test: Become the user as apache (sudo -u apache) and now try to change into the directory (cd) and make sure apache user is able to traverse.

Does Apache have read permissions on /home/ec2-user/services? Symlinks are by design 0777 for permissions, but only so everything flows through to take up the permissions of whatever the symlink is pointing at.

Need Your Help

@Html.DropDownList returns null when submitted

c# html-helper

I have here a scenario. I want to make an HTTP POST action in the form so here's how I did it.

Call jquery plugin in directive only after data is renderer in DOM

jquery angularjs angularjs-directive

I want to initialize a jquery plugin in an angular directive but only after the service data is returned and first renderer in the DOM.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.