Cannot force ISPC redirect IP to hostname

Discussion in 'Server Operation' started by MaxT, Apr 21, 2017.

  1. MaxT

    MaxT Member HowtoForge Supporter

    I want to redirect https://x.x.x.x:8080 to https://site.mysite.com:8080/ in all cases.

    I cannot get it in VirtualHost neither inside /usr/local/ispconfig/interface/web/.htaccess

    this is the code inside /etc/apache2/sites-available/ispconfig.vhost
    Code:
         
      <IfModule mpm_itk_module>
      DocumentRoot /usr/local/ispconfig/interface/web/
      AssignUserId ispconfig ispconfig
      AddType application/x-httpd-php .php
      <Directory /usr/local/ispconfig/interface/web>
         # adding here
         RewriteEngineOn
         RewriteCond %{HTTP_HOST} !^site.mysite.com$
         RewriteRule /.* https://site.mysite.com:8080/ [R]
    
    What's wrong?
     
  2. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    You can simply allow ISPC port 8080 to be opened via any domain (the simplest but not advisable way is to disable ISPC ssl). Or if you need to use a hostname for your ISPC, change your server hostname to it and then update your ISPC.

    I really think you don't need a redirect for that.
     
    Last edited: Apr 24, 2017

Share This Page