3

I just moved a new drupal site onto a directory '/drupal_test' under my current site. So that I can test it while my current site is still running.

When I go to the directory www.mysite.com/drupal_test. I got this error:

**Internal Server Error**
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Apache/2.2.16 (Debian) Server at www.bromptontech.com Port 80

I used putty command line to access the error log on the server and I got errors like this:

/var/www/drupal_test/.htaccess:Options not allowed here

I searched around and it seems something to do with the Allow Override settings, some say it is in httpd.conf, but I can't find this file anywhere, I can only find relevant code here in /etc/apache2/sites-enabled/000-default, I can see the tags.

Our IT guy gave me the root account to access the server, but he can't help me more than that, while I really have very limited knowledge about the server and these command lines, please can anyone help me with this? Thanks a lot!

1

3 Answers 3

2

As your running the drupal from sub directory so modify the line containing "RewriteBase" (may be line no. 102) of .htaccess, change "# RewriteBase /drupal" to "RewriteBase /drupal_test".

And if the above thing doesn't works for you than please try the following: Search for "<directory /var/www/>" in the "/etc/apache2/sites-available/default" file and change it as below:

<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
</Directory>
5
  • Hi, Thank you very much. I have done both of them, there is a weird thing: when I added the .htaccess onto the server in the drupal_test directory through ftp, it appeared one second and disappeared. Basically, I don't know why but I just can't add .htaccess onto the server. Do you have any idea why this happens? Commented Sep 30, 2013 at 9:09
  • Actually, I then used winSCP to access the root files, I can see .htaccess is there it is just a hidden file, would this be a problem? It still doesn't work for me :( Commented Sep 30, 2013 at 9:19
  • Actually as .htaccess is a hidden file therefore it may be disappearing when uploaded to the server. It wont cause any problem Commented Sep 30, 2013 at 9:41
  • Have you updated both the above things in .htaccess? make sure you remove the "#" before "RewriteBase /drupal_test" otherwise it would consider that line as commented Commented Sep 30, 2013 at 9:49
  • Thank you, it actually worked, just a little bit delay, now I have another problem with the database, but this issue is solved, thanks a lot! Commented Sep 30, 2013 at 11:02
0

If it present, replace the .htaccess file with the .htaccess file of a fresh Drupal installation. I think there is no .htaccess file present in your directory.

for your case you need to put .htaccess file under http://www.bromptontech.com/drupal_test/

Try the above step first.

Try replace .httaccess file, If you still facing the problem then check to make sure RewriteBase / is pointing at the right folder (may need to uncomment it), and RewriteRule uses are correct.

-1

Open up your .htaccess and remove

# Don't show directory listings for URLs which map to a directory.
Options -Indexes

# Follow symbolic links in this directory.
Options +FollowSymLinks

This will make your folder contents viewable (assuming it is not turned off at a global level), so you may want to investigate a solution for that, either putting an empty index.html in those directories or something that will turn off directory listing. The symlinks shouldn't be a big deal but you won't be able to use symlinks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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