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

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 23rd August 2010, 07:40
stolenpants stolenpants is offline
Junior Member
 
Join Date: Aug 2010
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Infinite redirect loop

Using ISPConfig 3.0.1.3

I was in the control panel messing with a domain, let's call it mydomain.com. I wanted to redirect it to /wiki/ and not knowing the redirect types, I tried all of them to see if any would work. They did not.

I set it back to no redirect and it still goes into an infinite redirect loop.

So then I edited /etc/apache2/sites-enabled/mydomain.com.vhost and I removed all the redirect statements like:

RewriteCond %{HTTP_HOST} ^mydomain.com [NC]
RewriteRule ^/(.*)$ /wiki/$1 [R]

I also looked through httpd.conf and apache2.conf, and I can't find anything that would cause this.

Where do I need to look to fix this. I've also rebooted the server every step of the way.
Reply With Quote
Sponsored Links
  #2  
Old 23rd August 2010, 09:20
Mark_NL Mark_NL is offline
Senior Member
 
Join Date: Sep 2008
Location: The Netherlands
Posts: 912
Thanks: 12
Thanked 99 Times in 95 Posts
Default

You know that you need to wait for the server.php cronjob to run to edit your changes to the config files and restart the services right?

the rewrite rule itself looks fine..
Reply With Quote
  #3  
Old 23rd August 2010, 15:45
stolenpants stolenpants is offline
Junior Member
 
Join Date: Aug 2010
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I removed all the redirect rules I can find. I am not familiar with where all the apache configs are stored and I'm not certain I got them all.

I am not familiar at all with ISPConfig or how it commits changes can you explain in detail about this process, I'm unable to find any documentation on this software, there's a few how-to mostly regarding installation and then this forum.
Reply With Quote
  #4  
Old 23rd August 2010, 16:07
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

Never edit a vhost file manually. Manual editing will just mess up the setup and all manual changes will get removed automatically anyway. Thats why it does not matter much for the user where the fiel gets stored as he should not edit it.

To your original problem, set redirect in the website options to "No redirect" and do the same in alias / subdomain options if you added any. Then wait a few minutes and try again.

Regarding the redirection, you can use this only if the cms or wiki that you installed does not use any .htaccess files. Otherwise the redirect rules from ispconfig maight interfere with the .htaccess file and will cause redirect problems.

In generella it is not recommended to use a different root dierctory if the website cinatins any active scripts like php. If you need a separate directory for a subdomain, then create a new website for that subdomain.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 23rd August 2010, 16:35
stolenpants stolenpants is offline
Junior Member
 
Join Date: Aug 2010
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have the site set to "no redirect" It's been set to this since the initial problem. The "no redirect" setting in ISPConfig is basically being ignored, I set it to this as as soon as I got the first re-direct loop.

I edited the vhost file manually because the system is ignoring the re-direct setting in the web interface. Either way it doesn't matter because even with all the redirects deleted from the vhost file, it continues to do the re-direct loop.

I deleted the subdomain to get rid of the redirect for it. No dice.

I'll deal with the actual redirect later but I'm trying to get my site back online now and I just want all redirects shut off. I did RewriteEngine off in the vhost to try and stop this, and nothing. My other sites are working fine, it's just this one. I can't find any additional config files.

Where is ISPconfig storing this config data? What file does it read when it overwrites the vhost? How often does it push these changes? What triggers it, besides a cron, to do this. Where is the cron file stored?
Reply With Quote
  #6  
Old 23rd August 2010, 16:38
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

Quote:
I can't find any additional config files.
Because there are no additional config files.

1) Take a look at the ispconfig monitor, are there any pending jobs in the jobqueue?
2) Any errors or warnings in the system log in the ispconfig monitor?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 23rd August 2010, 16:51
stolenpants stolenpants is offline
Junior Member
 
Join Date: Aug 2010
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

There are no jobs pending. I don't see anything in the system log.

I added the following to httpd.conf

RewriteEngine On
RewriteLog "/var/www/rewrite.log"
RewriteLogLevel 5

Maybe I'll be able to find some evidence this way.

Is it possible that something other than mod_rewrite is doing this?
Reply With Quote
  #8  
Old 23rd August 2010, 16:54
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

Quote:
There are no jobs pending. I don't see anything in the system log.
Ok. Then ispconfig was able to write all changes to disk without errors.

You should also check if there are any .htaccess files in the web directory of the website.

Quote:
Is it possible that something other than mod_rewrite is doing this?
Yes, redirects can be done by any kind of script. e.g. php script in the website. If you installed a cms or wiki in the website, then it might be the software that redirects you in a infinite loop.

It might also be a problem of the browser cache, so close your browser and try again.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #9  
Old 23rd August 2010, 17:08
stolenpants stolenpants is offline
Junior Member
 
Join Date: Aug 2010
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Went to log level 9, still nothing. Still in a loop.

There is a .htaccess file but it appears to be blank.

If I go to www.domain.org, it redirects. The only thing in there is an index.html file. mediawiki is installed at /wiki/ but it shouldn't be affecting this.

Cleared browser cache, reset, still nothing. Go to the URL and it keeps adding /wiki/wiki/wiki/wiki/wiki until the browser errors out.
Reply With Quote
  #10  
Old 23rd August 2010, 17:09
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
 
Default

Try to restart apache. If this dont help, post the vhost file for this website.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
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
Redirect Loop geekrohit Installation/Configuration 7 25th June 2010 18:11
Redirect Wireless Client to Late-Pay Notice giganet Server Operation 1 19th June 2009 08:57
Infinite loop mrlewis HOWTO-Related Questions 1 8th October 2007 17:33
Infinite bounce loop confuzzled Installation/Configuration 1 20th March 2006 20:25
Mandriva 2006 : infinite loop mails ! Aargh dreamed Installation/Configuration 1 13th February 2006 17:01


All times are GMT +2. The time now is 03:55.


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