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
  #11  
Old 27th May 2010, 19:12
thibotus01 thibotus01 is offline
Member
 
Join Date: Oct 2009
Posts: 89
Thanks: 2
Thanked 2 Times in 2 Posts
Default

I tried to create a new subdomain but I got the same error. And I tried to create a new subdomain associated to another domain and it works without problem... weirddd

Last edited by thibotus01; 27th May 2010 at 19:17.
Reply With Quote
Sponsored Links
  #12  
Old 27th May 2010, 22:24
thibotus01 thibotus01 is offline
Member
 
Join Date: Oct 2009
Posts: 89
Thanks: 2
Thanked 2 Times in 2 Posts
Default

I have just backup my last .vhost file and I realized that the rewrite rule was different:

previous one (works) :

Code:
RewriteEngine on
    RewriteCond %{HTTP_HOST}   ^media.domain.com[NC]
    RewriteRule   ^/(.*)$ /home/clients/client0/web12/web/media/$1  [L]
    RewriteCond %{HTTP_HOST}   ^domain2.com [NC]
    RewriteRule   ^/(.*)$ http://www.domain.com/$1  [R]
    RewriteCond %{HTTP_HOST}   ^mrtg.domain.com [NC]
    RewriteRule   ^/(.*)$ /home/clients/client0/web12/web/munin/$1  [L]
new one (403 error):

Code:
RewriteEngine on
    RewriteCond %{HTTP_HOST}   ^media.domain.com [NC]
    RewriteRule   ^/(.*)$ /media/$1  [L]
    RewriteCond %{HTTP_HOST}   ^domain2.com [NC]
    RewriteRule   ^/(.*)$ http://www.domain.com$1  [R]
    RewriteCond %{HTTP_HOST}   ^mrtg.domain.com [NC]
    RewriteRule   ^/(.*)$ /munin/$1  [L]
I don't know why ISPCONFIG changed this.

Last edited by thibotus01; 27th May 2010 at 22:29.
Reply With Quote
  #13  
Old 28th May 2010, 08:50
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,594
Thanks: 792
Thanked 4,984 Times in 3,904 Posts
Default

Quote:
I don't know why ISPCONFIG changed this.
We had "the new one" as default in ispconfig 3 from the beginning. Then we changed it to the code that you named "the previous one" and after this change the rewriting failed on almost all installed systems so we had to revert back to the code to "the new one".

I also checked the apache documentation and the code "the new one" is the correct one. So thats not the source of the problem.

We will have to find yout why this code does not work on your server. Please try to put the rewrite code part into a directory directive:

<Directory /home/clients/client0/web12/web/>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^media.domain.com [NC]
RewriteRule ^/(.*)$ /media/$1 [L]
RewriteCond %{HTTP_HOST} ^domain2.com [NC]
RewriteRule ^/(.*)$ http://www.domain.com$1 [R]
RewriteCond %{HTTP_HOST} ^mrtg.domain.com [NC]
RewriteRule ^/(.*)$ /munin/$1 [L]
</Directory>
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #14  
Old 28th May 2010, 10:32
thibotus01 thibotus01 is offline
Member
 
Join Date: Oct 2009
Posts: 89
Thanks: 2
Thanked 2 Times in 2 Posts
Default

It doesn't work.

media.domain.com display me the content of domain.com
Reply With Quote
  #15  
Old 3rd October 2010, 19:10
thibotus01 thibotus01 is offline
Member
 
Join Date: Oct 2009
Posts: 89
Thanks: 2
Thanked 2 Times in 2 Posts
Default

The problem is still unsolved :/
I temporary use the "old rule".
Reply With Quote
  #16  
Old 4th October 2010, 11:54
thibotus01 thibotus01 is offline
Member
 
Join Date: Oct 2009
Posts: 89
Thanks: 2
Thanked 2 Times in 2 Posts
Default

I found the problem !

Website running under Wordpress, subdomain media.domain.com seems to be reserved and used by the CMS. By resulting a 403 error...

I tested twice on 2 websites running with Wordpress.

My question is : why using a Rewrite rule instead of a real vhost for subdomain?

Should I open a ticket?
Reply With Quote
  #17  
Old 4th October 2010, 12:05
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,594
Thanks: 792
Thanked 4,984 Times in 3,904 Posts
Default

Quote:
media.domain.com display me the content of domain.com
Thats the intended behaviour of the subdomain function.

Looks as if you used the subdomain function (which is for subdomains that do not have a its own directory) instead of creating a new website.

If you like to have a subdomain which has its own directory (new vhost), you click on "new wesbite" and then enter sub.domain.com into the domain field.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #18  
Old 4th October 2010, 12:08
thibotus01 thibotus01 is offline
Member
 
Join Date: Oct 2009
Posts: 89
Thanks: 2
Thanked 2 Times in 2 Posts
Default

Take a look on my last message.

The rewrite rule is in conflict with the wordpress rewrite system. And the problem will always be if you create "media" as a sub-domain with a website running Wordpress.

Edit : I read your PM, I understand now... You can reply what you said.
Reply With Quote
  #19  
Old 4th October 2010, 12:12
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,594
Thanks: 792
Thanked 4,984 Times in 3,904 Posts
 
Default

Please see my answer in #17 in this thread. You used thew rong function. Instead of creating a new website, you created a subdomain record for a existing website which has to point to the website main dir as it is used for cms systems that are capable of running multidomain setups, e.g. wordpress mu, typo3 or joomla.

But you wanted to have a separate directory for a cms without multidomain support, so you must choose to create a new website and not a subdomain for a existing 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
Postfix queue problem? murunix Server Operation 7 2nd May 2011 01:55
Can't disable web domain dim-tlt General 1 14th May 2010 12:33
Viewing web sites without using their domain name? jameso General 3 21st November 2006 03:59
Default Web Dir fro Installation/Configuration 1 21st October 2006 12:03
SSL related problems senzapaura Installation/Configuration 45 25th March 2006 14:15


All times are GMT +2. The time now is 16:50.


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