![]() |
Choose listen port of a VirtualHost or overall apache listen port
I've realized that when a Server IP is added to ISPConfig, a list of listen ports can be choosen, and a NameVirtualHost IP:Port line is added to the apache config at sites-available/ispconfig.conf.
However there is no way to choose the listen port of apache server or of a site/virtualhost, only the IP can be choosen and to get listen in a different port is needed to change the default conf template at: /usr/local/ispconfig/server/conf/vhost.conf.master This is so weird, because in the template there is a "port" variable but I haven't found a way to change it in the ISPConfig panel. It would be cool can choose a different port for each virtualhost, this is very usefull when a reverse proxy like varnish is used in a machine with dinamic and static content with only 1 IP. And seems that the internal logic is almost implemented in ISPConfig to get this. Thank you, Tomás |
Hello, I use reverse proxy too. Apache is listening on port 82. I added this port to System => IP Addresses. ISPConfig use this config only in sites-available/ispconfig.conf when defining NameVirtualhosts.
So I looked at plugins, specific /usr/local/ispconfig/server/plugins-availableapache2_plugin.inc.php and I found that ports are hard coded in this file. So I edit hardcoded ports 80 to 82 and resync sites. Its on 4 places together. If I update ispconfig I must edit this file again. Will be better, if this plugin get right ports from db instead of hardcode it. |
Quote:
|
Quote:
|
I have this in vhosts.conf
Code:
<tmpl_loop name="vhosts">Code:
<tmpl_loop name="vhosts">in the past version of ispconfig, was in vhost.conf two virtualhosts. One for non-ssl and one fo ssl. Now, as we can see, is there loop. |
Your configuration is wrong. As you can see in the template,all ssl specfic instructions are wrapped in a if stetement, so you can select between ssl and non ssl easily. The correct configuration is:
Code:
<tmpl_loop name="vhosts"> |
I have latest ispconfig and I doesnt change anything in this file.
|
If you want to use customports, then you have to configure them in the vhost file like I explained above and like it is explained in other threads here in the forum as well. If you dont configure your custom ports, then it wont work of course ;)
|
Quote:
Quote:
I think that modify templates should be an "exception" action, what happens with that templates when ispconfig is upgraded? Would be needed to re-apply the changes to the templates? Also exists the problem with choose a different port/IP for different vhosts (maybe only some vhosts run with a reverse-proxy and not all of them) I understand that you may have other priorities but don't forget this please =) Thanks |
| All times are GMT +2. The time now is 21:49. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.