Subdomain proxy directive is hidden

Discussion in 'General' started by Uysim, Dec 17, 2020.

  1. Uysim

    Uysim New Member

    I create a Subdomain for website. When I click on option tab there is a text area with label Proxy directive. And yes, I need to work with that proxy. But suddenly, it is disappear. When I inspect element I can see that text area is display none.
    How can I work with that proxy directive?
     
  2. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    The <script> element just after the hidden proxy field shows:
    Code:
        var webId = jQuery('input[name="id"]').val();
        adjustForm();
           
        function adjustForm(){
            jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {web_id : webId, type : "getredirecttype"}, function(data) {
                if(data.redirecttype == "proxy"){
                    jQuery('.proxy').show();
                } else {
                    jQuery('.proxy').hide();
                }
            });
        }
    
    So it seems you would need to edit the main website, under Redirect select "proxy" as the type, and I have no idea what you'd need in Redirect Path at that point, but ... a step closer?
     
  3. Uysim

    Uysim New Member

    Are you sure for this?
    Because I feel this is the redirecttype of the subdomain. And the subdomain don't have proxy redirect
     
  4. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    You should create it as a separate site instead of a subdomain iirc.
     
  5. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Or use a vhost subdomain.
     
  6. Uysim

    Uysim New Member

    No. I what to route all subdomain. like *.example.com. So it need to work with subdomain
    Even so, subdomain feature should be working.
     
  7. Uysim

    Uysim New Member

    How to add vhost subdomain in ISPConfig?
     
  8. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    There is a setting to enable vhost subdomains/alias domains, I would guess in main config, but can't check at the moment.
     
  9. Uysim

    Uysim New Member

    I think this is a bug of ISPConfig but don't know where I can report it
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Do you use Apache or Nginx web server and which ISPConfig version do you use?
     
  11. Uysim

    Uysim New Member

    I use ISPConfig 3.2 with Apache server
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    Go to the redirect tab and set the redirect type to 'proxy' there, then go back to the options tab to see if the field shows up.
     
  13. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    It is not a bug, you were using a regular subdomain, which just add a ServerAlias to the vhost file; you can use a vhost subdomain to configure that different than the main website.
     
    Th0m likes this.
  14. Uysim

    Uysim New Member

    No it is not showing. And 5 minutes later it automatically rollback to no flag
     
  15. Uysim

    Uysim New Member

    All of you answers are not right. ISPConfig will say invalid domain when you save it
     
  16. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Can you show screenshot of the setup?
     
  17. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Some days it sure feels that way. :)

    Re-checking the above, indeed, the webId that causes the proxy field to hide is that of the subdomain, I made a mistake in looking that up the first time; so setting the parent website to 'proxy' is not a means to have the proxy field appear on the subdomain options.

    The other two solutions mentioned, to create the subdomain as a website itself, or to use a vhost subdomain, do allow me to select 'proxy' as a redirect type.

    I've not found anywhere that says invalid domain while doing this, though there is a "Domain is empty." message once you access the Options tab on a subdomain, I'm guessing that's what you are referring to. That is indeed a bug.

    As to allowing 'proxy' as an option in the non-vhost subdomain settings, I don't know if there's a technical reason it is not allowed, or simply was an omission when that was implemented. That would require some research/testing.
     

Share This Page