Ports 80 and 443 (change them)

Discussion in 'Tips/Tricks/Mods' started by pendientes, Nov 15, 2023.

  1. pendientes

    pendientes New Member

    Good morning. I have Virtualmin installed for the web pages but with ports 80 and 443 changed because on the same system I have docker with nginx proxy manager to be able to manage the containers and virtualmin for the web pages. Everything working perfectly.

    I try to do the same with ispconfig 3 but I can't do it. In ispconfig I change the ports in apache2 and from docker nginx proxy manager I redirect the calls to the pages to the port that I have indicated (in this case ports 89 and 4434) and I cannot find a way for ispconfig3 to respond.

    What is necessary to be able to do it? I think I've tried everything.
    Thank you
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The http and https port of a website in ISPConfig are set on the options tab of the website in ISPConfig.
     
  3. pendientes

    pendientes New Member

    Hi, Thanks, but I don't see that tab
    [​IMG]
     
    Last edited: Nov 15, 2023
  4. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Try opening it as an admin.
     
  5. remkoh

    remkoh Active Member HowtoForge Supporter

    Only for Nginx webservers.
    If the ISPConfig managed website runs on an Apache webserver then port options aren't shown in the options tab.
     
    till likes this.
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Oh, I was not aware that it was not implemented for both servers, I use Nginx only. Then he must copy the vhost template file from /usr/local/ispconfig/server/conf/vhost.conf.master to /usr/local/ispconfig/server/conf-custom/vhost.conf.master and then edit the port in /usr/local/ispconfig/server/conf-custom/vhost.conf.master then. he must change line 14 from:

    Code:
    <VirtualHost {tmpl_var name='ip_address'}:{tmpl_var name='port'}>
    to

    Code:
    <tmpl_if name="port" value="80">
    <VirtualHost {tmpl_var name='ip_address'}:89>
    <tmpl_else>
    <VirtualHost {tmpl_var name='ip_address'}:4434>
    </tmpl_if>
    
     
    pendientes and ahrasis like this.
  7. pendientes

    pendientes New Member

    Thanks!, I'll let you know if it works.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Be aware that this gets applied only to new websites or websites where you change a value and save it to enforce that the config gets rewritten. You can also use Tools > resync if you have already many sites created to enforce the update.
     
    pendientes likes this.
  9. pendientes

    pendientes New Member

    IT WORKS!!!!

    Thanks a lot for your support! I apreciate it! Have a nice day
     

Share This Page