1

I have installed Drupal 7.37 on AWS EC2 Linux instance. It was working perfectly until I reinstalled httpd24 and PHP 5.5. Since then, the main page loads perfectly but I cannot access my virtual directories. For instance, when I click on Drupal's button "Login" it tries to load mypage.com/user/logout (I have clean URLs activated), but I get error 404.

This is my VirtualHost:

<VirtualHost *:80>
    ServerName www.mypage.com
    ServerAlias mypage.com
    DocumentRoot /usr/share/drupal7
</VirtualHost>

And Directory:

<Directory "/usr/share/drupal7">
    AllowOverride None
    Require all granted
</Directory>

Where should I search for the problem? httpd.conf or php.ini?

EDIT1: Access logs output when I try to access one of these pages. No error log outputs:

xx.xx.xx.xx - - [14/May/2015:16:35:47 +0000] "GET / HTTP/1.1" 200 18900 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36"
xx.xx.xx.xx - - [14/May/2015:16:35:55 +0000] "GET /admin/structure/block?render=overlay HTTP/1.1" 404 219 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36"

EDIT2: I have another website with virtual directories running on /var/www/html and it works perfectly. But this one (/usr/share/drupal7) doesn't.

EDIT3: I just tried moving my page to /var/www/html and I get the same problem. Could it be a drupal issue while creating these virtual directories (e.g., /admin /artefacts /user)? .htaccess?

5
  • Did you check the httpd logs? – 030 May 14 '15 at 16:31
  • It looks like that this snippet has been retrieved from the access log. Did you check the error log as well? – 030 May 14 '15 at 16:39
  • There are no errors at all. It looks to me that I do have permissions to visit mypage.com but not mypage.com/whatever. Could it be the case? – Arturo May 14 '15 at 16:48
  • Could you check whether /usr/share/drupal7 is not empty and check the owner and group of this folder? The httpd has been restarted once the httpd.conf was changed? – 030 May 14 '15 at 16:51
  • The directory has content (and it actually shows the index properly), the owner and group are "root" as expected. httpd restarted without consecuences – Arturo May 14 '15 at 17:01
1

Fixed! I just needed to edit the directory with AllowOverride All, as per below:

<Directory "/usr/share/drupal7">
    AllowOverride All
    Require all granted
</Directory>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.