0

It has been many, many moons since I've set up an Apache server. I'm assuming some things have changed.

The new one I'm doing is on AWS (Linux). It's installed fine with PHP support. I installed Twig via yum. The default location is ~ec2-user/Twig. I'm trying to load the Twig Autoloader, but PHP is telling me that it is unreadable. Definitely not a file permissions or ownership error. To test, I changed everything recursively to 777 and have tried a few owners (yes, it's been changed back). If I copy Twig to /var/www/html and access it from there, it's readable.

I don't recall ever having to give explicit permission for Apache to read other directories, but as per before, it's been years since I've done this. A lot could have changed. So, the question is do I need to change something in httpd.conf ?

Regards

2
  • What OS are you using? If CentOS or similar, could be related to SELinux. If not, could be that your apache process does not have read/execute access to the parent folders of ~ec2-user/Twig. Also, I assume you are specifying full path (no ~ chars) to the folders on apache configuration.
    – NuTTyX
    Sep 10, 2014 at 19:48
  • It's Amazon's unique flavor. Forgot what they're calling it. The question below seems to answer it, although going the pear route seems to be smarter. Sep 10, 2014 at 20:24

1 Answer 1

2

UserDir is disabled by default, if you want to access it via ~ec2-user/Twig you need to uncomment UserDir public_html and place all files that you want to be accessible to public_html folder inside of your $HOME, don't forget to restart apache after uncommenting out UserDir, also you might need to check SELinux as well.

1
  • Thanks, that seems to be it. I actually installed Twig via pear which put it in /usr/share/Twig, which by default works. No telling what goes in my userdir, so for now I'll stick w/ the pear approach. Sep 10, 2014 at 20:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .