$tpl->setVar('rewrite_to_https', 'n') user selectable

Discussion in 'Feature Requests' started by brandhout, Dec 3, 2021.

  1. brandhout

    brandhout New Member

    Hi!

    It would be nice/easier to make
    PHP:
    $tpl->setVar('rewrite_to_https''n')
    user selectable in
    Code:
    /usr/local/ispconfig/server/plugins-available/apache2_plugin.inc.php : 1536
    We have a domain with an API for a mobile application, this domain is SSL enabled. But the mobile app makes HTTP request, this will take a while to fix on the client side.

    The problem is that the app can't handle the rewrites because they are applied before the CORS headers. So every time we mutate the site in ISPconfig the app breaks. I could mutate the vhost template but that will probably brake with updating.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    What about disabling HTTP to HTTPS rewrite option in the website settings on the rewrite tab?
     
  3. brandhout

    brandhout New Member

    That's the solution, thank you.

    I don't see it at that particular domain, so I couldn't find such a option, that's why I made this topic in the first place, but that's a separate issue and probably PEBCAC. I will try to request letsencrypt again within ISPconfig.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    This option is available in any domain in ISPConfig, unless you modfied the ISPConfig source code to remove that config option, see redirect tab of the website.

    Did you try to get a LE cert for an ISPConfig website on the shell? If yes, then this site has probably become unmanageable in ISPconfig as the certbot vhost parser duplicates the config in a way that settings in ISPConfig can't work anymore until you undo all changes made by certbot.
     
  5. brandhout

    brandhout New Member

    I will reconfigure this server. The problem is at our side; thank you for your time and helpful answers.
     

Share This Page