1

On Server A (debian) drupal was installed by the package manager. So basically the codebase is at: /usr/share/drupal7 with /usr/share/drupal7/sites symlinking to /etc/drupal/7/sites.

Server B has basically the same setup (ubuntu).

The multi-site feature is configured like that: At /etc/drupal/7 we have a apache.conf:

Alias /site1 /usr/share/drupal7
Alias /site2 /usr/share/drupal7

<Directory /usr/share/drupal7/>
        Options +FollowSymLinks
        AllowOverride All
        order allow,deny
        allow from all
</Directory>

I copied the Site from A to B. In A it was installed at /sites/default so I copied it to /sites/default at B. The index page (www.foo.com/drupal7) is redirected to /sites/default. So basically it works.

But if I go to e.g. www.foo.com/drupal7/members I get: 404: The requested URL /usr/share/drupal7/index.php was not found on this server.

Also: If I want a multisite like www.foo.com/site1 I create it at /sites/foo.com.site1

Question 1: How can I confiure it so it works on / rather than on /drupal7? So basically I'd like to use this site "normal" on /sites/default but another site at /sites/site1.

Question 2: How can I fix the 404 error?

1

How can I confiure it so it works on / rather than on /drupal7

This has to do with your Apache VirtualHost. It probably is pointing to /usr/share/ instead of to /usr/share/drupal7. So in order to access the content in the drupal7 folder, you need to add the folder to the url.

Question 2: How can I fix the 404 error?

Relating to:

But if I go to e.g. www.foo.com/drupal7/members I get: 404: The requested URL /usr/share/drupal7/index.php was not found on this server.

The first thing is figuring out if there is an index.php file there. If so, does it have the correct permissions?

It seems to be an Apache error, not a Drupal error at this point. ;)

4
  • yeah from what I see there isn't really any vhost config except the apache.conf I posted above. And they all point to /usr/share/drupal7. But it's possible that I'll have to write proper rewrite ruels since alias might not work in this case. Or just set up proper vhost.
    – xotix
    Mar 12 '17 at 11:56
  • also, I just saw that a htaccess file points 404 errors to /index..php which might explain my error from above. So basically it can't resolve /members because I only use aliases (i guess) and then trhows a 404 and then I get the strange index error.
    – xotix
    Mar 12 '17 at 12:02
  • 1
    The 404 could be an issue with the rewrite rules and clean urls. Could you try accessing it via /index.php?q=members instead of /members. The 404 error, is it on an error page themed like your site?
    – rovr138
    Mar 12 '17 at 14:57
  • thanks you! You reminded me of looking at the rewrite rules - which were wrong configured. Everything works fine now. :) Thanks everyone.
    – xotix
    Mar 13 '17 at 16:38

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.