
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,911
Thanks: 693
Thanked 4,196 Times in 3,212 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,911
Thanks: 693
Thanked 4,196 Times in 3,212 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,911
Thanks: 693
Thanked 4,196 Times in 3,212 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.
|

1st August 2006, 22:52
|
|
Member
|
|
Join Date: Jun 2006
Location: Vienna, Austria
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
same problems with drupal on Ubuntu 6.06
hello -
i was reading these entries and tried to fix my problems.
since i've put drupal into my /home/web6/web/cms - directory, i have the
"500 Internal Server Error".
my httpd.conf looks like this:
Code:
<Directory /home/*/user/*/web>
Options +Includes -Indexes
AllowOverride All
# AllowOverride Indexes AuthConfig Limit FileInfo
Order allow,deny
Allow from all
<Files ~ "^\.ht">
Deny from all
</Files>
</Directory>
and the .htaccess-file looks like this:
Code:
#
# Apache/PHP/Drupal settings:
#
# Protect files and directories from prying eyes.
<FilesMatch "(\.(engine|inc|install|module|sh|.*sql|theme|tpl(\.php)?|xtmpl)|code-style\.pl|Entries.*|Repository|Root)$">
Order deny,allow
Deny from all
</FilesMatch>
# 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 in sites/default/settings.php
# but the following cannot be changed at runtime.
# PHP 4, Apache 1
<IfModule mod_php4.c>
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
</IfModule>
# PHP 4, Apache 2
this is in the LOG-file (/home/web6/log):
Code:
[Wed Aug 02 10:23:16 2006] [alert] [client 85.125.230.181] /home/web6/web/.htaccess: Options not allowed here
so, i really don't know how to make it work properly.
Please folks, help me!
__________________
___________________
pinz0 - working on ubuntu 6.06 + ispconfig
Last edited by pinz0; 2nd August 2006 at 10:28.
|

2nd August 2006, 03:19
|
|
Member
|
|
Join Date: Feb 2006
Posts: 65
Thanks: 0
Thanked 2 Times in 2 Posts
|
|
Quote:
Code:
<Directory /home/*/user/*/web>
Options +Includes -Indexes
AllowOverride All
# AllowOverride Indexes AuthConfig Limit FileInfo
Order allow,deny
Allow from all
<Files ~ "^\.ht">
Deny from all
</Files>
</Directory>
|
change to
Code:
<Directory /home/*/user/*/web>
Options +Includes -Indexes
AllowOverride All
# AllowOverride Indexes AuthConfig Limit FileInfo
Order allow,deny
Allow from all
# <Files ~ "^\.ht">
# Deny from all
# </Files>
</Directory>
Try this. I'm not sure if that will work, but I think
Code:
<Files ~ "^\.ht">
Deny from all
</Files>
prevents .htaccess to be loaded. "^\.ht" is a regular expression matching files beginning with ".ht", so .ht*.
I could be mistaken though. Have a look at the docs on the apache website.
__________________
Always mention at least your distribution/version! You can add it in your signature if you don't want to always type it. ;-)
Distributions:
Ubuntu 5.10 with custom kernel (2.6.16-suspend2),
Debian Sarge 3.1 and Etch
Please submit your ISP or Webhost to (free)
http://www.ihostnz.com
|

2nd August 2006, 14:07
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,594 Times in 2,445 Posts
|
|
Code:
<Directory /home/*/user/*/web>
Options +Includes -Indexes
AllowOverride All
# AllowOverride Indexes AuthConfig Limit FileInfo
Order allow,deny
Allow from all
<Files ~ "^\.ht">
Deny from all
</Files>
</Directory>
is the wrong stanza.
It's this stanza:
Code:
<Directory /home/*/web>
Options +Includes -Indexes
AllowOverride None
AllowOverride Indexes AuthConfig Limit FileInfo
Order allow,deny
Allow from all
<Files ~ "^\.ht">
Deny from all
</Files>
</Directory>
that you must change.
|

2nd August 2006, 14:32
|
|
Member
|
|
Join Date: Jun 2006
Location: Vienna, Austria
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
THANKS!
it works now! many thanks for the quick help.
bests!
__________________
___________________
pinz0 - working on ubuntu 6.06 + ispconfig
|
| Thread Tools |
|
|
| Display Modes |
Hybrid 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 21:51.
|
Recent comments
21 hours 58 min ago
22 hours 3 min ago
1 day 3 hours ago
1 day 9 hours ago
1 day 10 hours ago
1 day 11 hours ago
1 day 16 hours ago
1 day 22 hours ago
2 days 2 hours ago
2 days 4 hours ago