how to restart ispc3 service

Discussion in 'General' started by radim_h, Mar 23, 2009.

  1. HellMind

    HellMind New Member

    The problem is that you Can't modified that file
    Like you said before
    You must not touch it

    Because if you make a change on the cfg it will overwrite it

    Where is the auto www function, that add that cfg to the vhost file :S?
     
  2. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    You shall not modify the file, you shall add the / in the rewrite field. And I told you already in post #8 of this thread that you can modify the template. The remplates are in /usr/local/ispcnfig/server/conf/
     
  3. HellMind

    HellMind New Member

    Sorry,
    I found on vhost.conf.master

    RewriteEngine on
    <tmpl_loop name="redirects">
    RewriteCond %{HTTP_HOST} ^<tmpl_var name='rewrite_domain'> [NC]
    RewriteRule ^/(.*)$ <tmpl_var name='rewrite_target'>$1 <tmpl_var name='rewrite_type'>
    </tmpl_loop>
    </tmpl_if>

    But if I add there the /
    I I must to remove the / on all the aliases domain rediect?

    How can I add the / when it do the "INSERT" on db of www auto redirects?
     
  4. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    Seems as if you do not read my posts at all. No, I did not told you to add it there. Read again post 22:

    "You shall not modify the file, you shall add the / in the rewrite field."
     
  5. HellMind

    HellMind New Member

    I'm sorry English isn't my native language

    when you said
    "You shall not modify the file," You weren't talking about *.vhost?
    Are you talking about vhost.conf.master?


    Where is, or at least how it is called the file where I shall add the /
    "The templates are in /usr/local/ispcnfig/server/conf/"
    I don't see where.
     
  6. HellMind

    HellMind New Member

    Till should delete my and his post regarding to my question because its like I was talking in spanish and he in german.

    My issue is very simple

    I want to rediect/rewrite, domain.com TO www.domain.com

    I think it can be done with the Auto-Subdomain Option.

    Well, that option for me, isn't work.
    It doesn't add the rewrite rule to the vhost file. (It should do that?)

    I know it isn't work because, I'm not being redirected if I go to domain.com

    Thank you.
     
  7. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    Here is your first post in the thread:

    -------------------------------------------------------------
    but this isn't 100% truth

    I ve modified my .vhost from apache2

    Restarted apache2 and works fine

    But, if I reboot, ispc restore the .vhost file

    Why?
    ---------------------------------------------------------------

    So were did you ask this question there? The first time you asked
    the question how to rewrite domain.com to www.domain.com in your last post #26.

    There is no redirect needed as you get the same content of the website when you
    enable the auto subdomain when you enter www.domain.com
    or just domain.com. Thats what the function is intended to do and
    this is what the function does.

    If you automatically want to rewrite domain.com to www.domain.com
    which is not nescessary but can be done of course e.g for search engine optimisation, you can do this with apache rewrite rules that can be added to the apache directives field (See my post #8 part 3) in case that you want to have other rewrite rules then the ones that ispconfig adds on the rewrite tab.

    For example just add:

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^domain.com [NC]
    RewriteRule ^/(.*)$ http://www.domain.com/$1 [R]
     
  8. HellMind

    HellMind New Member

    My question is there in the thread using a complex language :p.

    The conclusion

    What Auto-Subdomain Option does?
    It just add a subdomain www. or *. (serveralias vhost)

    If you want to do the redirect of .dom.com -> www.dom.com You should create your own .htaccess.
    Or using the apache directive option.

    -
    I will try apache directive method.

    Thank you Till

    --

    I think the whole problem was I had a .htaccess and that was doing the rewrite.
     

Share This Page