
8th October 2005, 17:06
|
|
Junior Member
|
|
Join Date: Oct 2005
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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 17:57.
|

8th October 2005, 17:31
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,894
Thanks: 693
Thanked 4,189 Times in 3,206 Posts
|
|
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.
|

8th October 2005, 17:57
|
|
Junior Member
|
|
Join Date: Oct 2005
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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 18:22.
|

8th October 2005, 19:05
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,894
Thanks: 693
Thanked 4,189 Times in 3,206 Posts
|
|
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
|

8th October 2005, 23:47
|
|
Junior Member
|
|
Join Date: Oct 2005
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|

9th October 2005, 12:19
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,894
Thanks: 693
Thanked 4,189 Times in 3,206 Posts
|
|
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.
|

9th October 2005, 13:37
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,592 Times in 2,443 Posts
|
|
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...
|

4th May 2006, 21:02
|
|
Junior Member
|
|
Join Date: May 2006
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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).
|

16th May 2006, 14:10
|
|
Member
|
|
Join Date: Mar 2006
Posts: 73
Thanks: 7
Thanked 0 Times in 0 Posts
|
|
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.
|

16th May 2006, 15:48
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,592 Times in 2,443 Posts
|
|
What's in your Apache error log?
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 13:44.
|
|
Recent comments
4 hours 32 min ago
14 hours 22 sec ago
14 hours 49 min ago
18 hours 23 min ago
22 hours 47 min ago
23 hours 9 min ago
1 day 1 hour ago
1 day 11 hours ago
1 day 16 hours ago
1 day 17 hours ago