Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 8th February 2007, 20:46
praenti praenti is offline
Junior Member
 
Join Date: Jan 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Question htaccess does not work on Ubuntu Dapper Drake

Hi,

I need some help with setup my Apache. I did the Perfect Setup on the server where ISPConfig is running. The problem is that Apache ignores my .htaccess files in the web directorys.
For example, I have here a directory /data/www/web9/web where a .htaccess is present (ReWrite and Auth doesn't work, configuration is OK because on my other server this works very well and writing the rules directly into teh vhost config gets them running).
Looking into /var/log/apache2/error.log on LogLevel debug doesn't show any error, so the file is ignored because I get the index.html and a corresponding entry in the access-log.

Changing the entry to this state:
<Directory /var/www/*/web>
Options +Includes -Indexes -ExecCGI
AllowOverride All
Order allow,deny
Allow from all
<Files ~ "^\.ht">
Deny from all
</Files>
</Directory>
doesn't bring any effect :-(. Also a AllowOverride directive in the vhost config doesn't have any effect.

So the only conclusion is that ISPConfig uses a configuration, which ignores .htaccess files, if you install it on a standard Ubuntu Apache (which in other cases does not ignore .htaccess).
So whats wrong there, I need help here!

Btw. I've also seen that there are Filter-Directives in the vhost configuration which produce an error on the configuration. Is there a special meaning behind, because I don't see what they should do.

Cheers,
Mike
Reply With Quote
Sponsored Links
  #2  
Old 8th February 2007, 21:05
martinfst martinfst is offline
Senior Member
 
Join Date: Dec 2006
Location: Hilversum, The Netherlands
Posts: 880
Thanks: 1
Thanked 18 Times in 17 Posts
Send a message via MSN to martinfst Send a message via Skype™ to martinfst
Default

The errors are logged per site, not in the main Apache2 error log.

Look in /var/www/web1/log/error.log for site related errors. Substitute of course your ispweb location and the web_id with your site specifics. Have you set the permissions and owner/group correctly for .htaccess?
Reply With Quote
  #3  
Old 8th February 2007, 21:15
praenti praenti is offline
Junior Member
 
Join Date: Jan 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Are you shure that the errors are logged per site? Because you need then a ErrorLog directive in the vhost which is not present. And I see other errors in the main error log from vhosts, which are coming from the PHP Filter-Directives ("[Thu Feb 08 21:05:35 2007] [error] an unknown filter was not added: PHP
").

At the moment the htaccess has permissions "rw-r-r web9_admin web9". Is this insufficient, because on my other server the htaccess-files have the same permissions.
Reply With Quote
  #4  
Old 8th February 2007, 21:17
praenti praenti is offline
Junior Member
 
Join Date: Jan 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Smile

Ahh. Wait a moment, I'm somehow a little bit blind... There is an ErrorLog directive :-). Thank you. The helps a lot. I will post a solution if I have one!
Reply With Quote
  #5  
Old 8th February 2007, 21:31
praenti praenti is offline
Junior Member
 
Join Date: Jan 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Question

I had also an error into the directory names because I moved the /var/www to /data/www and created a softlink. I corrected that now to /data/www, because Apache was confused about that. So the Directory-Directives are working now correctly.

Also there no error message. If I rename the index.html I get an index forbidden error, as I expect, so no error. Just an ignored htaccess file.

What else can I do?
Reply With Quote
  #6  
Old 8th February 2007, 21:42
praenti praenti is offline
Junior Member
 
Join Date: Jan 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs up

Ok. .htaccess is now working. Looks like in the test before, mod_rewrite does not work. Implementing a http-auth works.

So thank for your help. Perhaps anybody has a hint why mod_rewrite does not work in htaccess files?

Cheers,
Mike
Reply With Quote
  #7  
Old 8th February 2007, 22:01
martinfst martinfst is offline
Senior Member
 
Join Date: Dec 2006
Location: Hilversum, The Netherlands
Posts: 880
Thanks: 1
Thanked 18 Times in 17 Posts
Send a message via MSN to martinfst Send a message via Skype™ to martinfst
Default

Rewrite in .htaccess works perfect for me.
I've set the RewriteLogLevel to 5 or 9 to get more debug info and I created a rewrite log to see what happens. You need to do that in the text block of ISPConfig website, setting the log level cannot be done in a .htaccess file.
Attached Images
 
Reply With Quote
  #8  
Old 8th February 2007, 22:31
praenti praenti is offline
Junior Member
 
Join Date: Jan 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
 
Thumbs up

That was the hint what I needed. My Log says:
applying pattern '^/(.+)$' to uri '' for http://www.xyz.de/
and
applying pattern '^/$' to uri 'index.html' for http://www.xyz.de/index.html

Normally I would expect that in the first case the URI is '/' and in the second case '/index.html' (see RFC 3986). I don't know why Ubuntu's Apache doesn't care about the RFC if I understood it correctly (my two other Apaches give here a heading '/') and why the heading '/' is missing in the URI but I think with this knowlegde I can do a correct rewrite.

So thank you for your help.

Cheers,
Mike

Last edited by praenti; 8th February 2007 at 22:40.
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
The Perfect Setup - Ubuntu 6.06 LTS Server (Dapper Drake) Q&A NGNZ Installation/Configuration 8 13th June 2008 17:52
Ubuntu Dapper Drake with MySQL4 and Apache2/PHP4 Nap Installation/Configuration 8 15th November 2006 15:30
Installation questions with ISPconfig using ubuntu dapper drake darkomen Installation/Configuration 14 1st November 2006 19:36
Error when following How To Install VMware Server On Ubuntu 6.06 LTS (Dapper Drake) - somas1 HOWTO-Related Questions 7 20th August 2006 14:07
How To Set Up Xen 3.0 From Binaries In Ubuntu 6.06 LTS (Dapper Drake) dspott HOWTO-Related Questions 3 30th June 2006 09:30


All times are GMT +2. The time now is 19:12.


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