Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 8th October 2005, 18:06
jon335 jon335 is offline
Junior Member
 
Join Date: Oct 2005
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation ISPConfig, Drupal, and .htaccess

I am trying to install Drupal for my website, but I am running into a problem. When I go to my website I get:
500 Internal Server Error

I uploaded all the files for drupal, created the database, and edited the settings file for my site.

Here is part of the log:

Code:
error.log
[Sat Oct 08 10:54:09 2005] [alert] [client 192.168.1.230] /var/www/web1/web/.htaccess: Options not allowed here
[Sat Oct 08 10:54:09 2005] [alert] [client 192.168.1.230] /var/www/web1/web/.htaccess: Options not allowed here
[Sat Oct 08 10:54:09 2005] [alert] [client 192.168.1.230] /var/www/web1/web/.htaccess: Options not allowed here
[Sat Oct 08 10:54:09 2005] [alert] [client 192.168.1.230] /var/www/web1/web/.htaccess: Options not allowed here
[Sat Oct 08 10:54:09 2005] [alert] [client 192.168.1.230] /var/www/web1/web/.htaccess: Options not allowed here
[Sat Oct 08 10:54:09 2005] [alert] [client 192.168.1.230] /var/www/web1/web/.htaccess: Options not allowed here

Code:
.htaccess
#
# Apache/PHP/Drupal settings:
#

# Protect files and directories from prying eyes.
<Files ~ "(\.(inc|module|pl|sh|sql|theme|engine|xtmpl)|Entries|Repositories|Root|scripts|updates)$">
  Order deny,allow
  Deny from all
</Files>

# Set some options.
Options -Indexes
Options +FollowSymLinks

# Customized error messages.
ErrorDocument 404 /index.php

# Set the default handler.
DirectoryIndex index.php

# Override PHP settings. More exist in sites/default/settings.php, but
# the following cannot be changed at runtime. The first IfModule is
# for Apache 1.3, the second for Apache 2.
<IfModule mod_php4.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
</IfModule>

<IfModule sapi_apache2.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
</IfModule>

# Reduce the time dynamically generated pages are cache-able.
<IfModule mod_expires.c>
  ExpiresByType text/html A1
</IfModule>

# Various rewrite rules.
<IfModule mod_rewrite.c>
  RewriteEngine on

  # Modify the RewriteBase if you are using Drupal in a subdirectory and
  # the rewrite rules are not working properly.
  #RewriteBase /drupal

  # Rewrite old-style URLs of the form 'node.php?id=x'.
  #RewriteCond %{REQUEST_FILENAME} !-f
  #RewriteCond %{REQUEST_FILENAME} !-d
  #RewriteCond %{QUERY_STRING} ^id=([^&]+)$
  #RewriteRule node.php index.php?q=node/view/%1 [L]

  # Rewrite old-style URLs of the form 'module.php?mod=x'.
  #RewriteCond %{REQUEST_FILENAME} !-f
  #RewriteCond %{REQUEST_FILENAME} !-d
  #RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
  #RewriteRule module.php index.php?q=%1 [L]

  # Rewrite current-style URLs of the form 'index.php?q=x'.
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>

# $Id: .htaccess,v 1.66 2005/03/20 19:15:00 dries Exp $
What should I do??

Last edited by jon335; 8th October 2005 at 18:57.
Reply With Quote
Sponsored Links
  #2  
Old 8th October 2005, 18:31
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,015
Thanks: 840
Thanked 5,652 Times in 4,461 Posts
Default

At the end of your httpd.conf is a section like this:

Code:
<Directory /home/www/*/web>
    Options +Includes +FollowSymlinks -Indexes
    AllowOverride Indexes AuthConfig Limit FileInfo
    Order allow,deny
    Allow from all

    <Files ~ "^\.ht">
    Deny from all
    </Files>
</Directory>
There you must chnage the AllowOverride statement to allow all settings in the drupal .htaccess file. For test purposes you might even change it to: AllowOverride All

Then restart your apache webserver.
Reply With Quote
  #3  
Old 8th October 2005, 18:57
jon335 jon335 is offline
Junior Member
 
Join Date: Oct 2005
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Where is httpd.conf located?

I'm using the Ubuntu 5.04 Perfect Setup.
__________________
-----
jon335
Trying to learn Linux, ISPConfig, Drupal, and VoiceXML

Last edited by jon335; 8th October 2005 at 19:22.
Reply With Quote
  #4  
Old 8th October 2005, 20:05
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,015
Thanks: 840
Thanked 5,652 Times in 4,461 Posts
Default

Quote:
Originally Posted by jon335
Where is httpd.conf located?

I'm using the Ubuntu 5.04 Perfect Setup.
In Ubuntu the httpd.conf file is named /etc/apache2/apache2.conf
Reply With Quote
  #5  
Old 9th October 2005, 00:47
jon335 jon335 is offline
Junior Member
 
Join Date: Oct 2005
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks, that worked perfectly. Is it OK to leave the AllowOverride setting set to All, or should I set it to something else?
__________________
-----
jon335
Trying to learn Linux, ISPConfig, Drupal, and VoiceXML
Reply With Quote
  #6  
Old 9th October 2005, 13:19
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,015
Thanks: 840
Thanked 5,652 Times in 4,461 Posts
Default

AllowOverride All means that all settings allowed in the vhost configuration can be overridden with .htaccess files. Thats insecure because your customers are able to change their apache configuration. Maybe you have a look at the apache.org website, there is a documentation what settings are allowed with allow override and you can decide which rights you want to give to your customers.
Reply With Quote
  #7  
Old 9th October 2005, 14:37
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,751 Times in 2,581 Posts
Default

Hi jon335,

here's another thread that might be interesting for you: http://www.howtoforge.com/forums/showthread.php?t=38

It has nothing to do with your problem in this thread, but it has also to do with Drupal (and apache rewrite rules). In case you run into the same problems when playing around with Drupal...
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #8  
Old 4th May 2006, 22:02
stamy stamy is offline
Junior Member
 
Join Date: May 2006
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Talking

I've got it !

The solution was to modify this file: /etc/apache2/apache2.conf

<Directory /home/www/*/web>
Options +Includes +FollowSymlinks -Indexes
#===============HERE==============
AllowOverride All
#=================================
Order allow,deny
Allow from all

<Files ~ "^\.ht">
Deny from all
</Files>
</Directory>

Thank's all for your help (maybe there is a cleaner way to do that, lower risk without using "All" for AllowOverride options).
Reply With Quote
  #9  
Old 16th May 2006, 15:10
minskog minskog is offline
Member
 
Join Date: Mar 2006
Posts: 73
Thanks: 7
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by stamy
I've got it !

The solution was to modify this file: /etc/apache2/apache2.conf

<Directory /home/www/*/web>
Options +Includes +FollowSymlinks -Indexes
#===============HERE==============
AllowOverride All
#=================================
Order allow,deny
Allow from all

<Files ~ "^\.ht">
Deny from all
</Files>
</Directory>

Thank's all for your help (maybe there is a cleaner way to do that, lower risk without using "All" for AllowOverride options).
I do it, but dont works for me:

Code:
<Directory /usr/var/www/virtual/*/web>
    Options +Includes -Indexes
    AllowOverride All
    #AllowOverride Indexes AuthConfig Limit FileInfo
    Order allow,deny
    Allow from all
    <Files ~ "^\.ht">
    Deny from all
    </Files>
</Directory>
Gives error 500.
Reply With Quote
  #10  
Old 16th May 2006, 16:48
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,751 Times in 2,581 Posts
 
Default

What's in your Apache error log?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Drupal and Apache Rewrite Rules andre Server Operation 10 4th May 2006 22:04
.htaccess / Apache kermit Server Operation 1 18th May 2005 17:32


All times are GMT +2. The time now is 01:53.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.