How to set site(s) listening on customized ports ?

Discussion in 'Installation/Configuration' started by Keoz, Dec 18, 2020.

  1. Keoz

    Keoz Member


    *** MY ENVIRONMENT ***
    Machine : remote VPS SSD 2
    OS distro : Ubuntu 18.04
    Cpanel : ISPConfig 3.1
    Web server : Apache 2.4

    I wish to install AzuraCast webradio server that’s domain name is e.g. ““, but it can only be installed via ssh command lines, and the process allows to automatically set Let’s Encrypt on customized ports (e.g. 82 and 8082), so that its default ones, 80 and 443, can’t conflict with default ISPConfig configuration (Apache2.4 already listening on ports 80 and 443).

    I then firstly allowed ports 82 and 8082 from under the firewall tab !

    But if I install AzuraCast webradio server through a path matching with ISPConfig configuration e.g. /var/www/clients/client1/web1/web/azuracast, how shall ISPConfig behave by default :
    • does it apply the AzuraCast ports customization (82 and 8082) ?
    • or does it override Azuracst ports customization, bringing ports 82 and 8082 back to 80 and 443 ?
    Whatever happens, if afterward a site for AzuraCast is set from ISPConfig panel, could I constrain it to individually listen on ports 82 and 8082 (without conflicting with other site(s) listening on ports 80 and 443) ?

    If yes, how can get this done :

    • from panel, maybe through some directives settings ?
    • Or via ssh command lines in terminal ?
    • MORE OVER : if not set during ssh installation, can Lest'encrypt for AzuraCast be set afterward from ISPConfig panel ?
    If no : should I install AzuraCast through default path var/www/html...., rather than through path matching ISPConfig configuration ?

    Last edited: Dec 18, 2020
  2. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    The only problem I see if you use docker to install this AzuraCast as docker is, it is not compatible with ISPConfig environment.

    I would suggest you to try using ansible method though that is not officially supported by AzuraCast anymore as the method seems friendly to ISPConfig.

    Changes of ports may not be necessary if it is ISPConfig friendly / compatible.

    Well, I may be wrong as re-reading a thread in here says using ISPConfig inside a docker container may not be advisable but using it inside ISPConfig may be otherwise.

    There is also a thread (issue) in github which seems to suggest a proxy approach that can work with ISPConfig except may be for Web DJ web socket issue.

    Do dig up to learn further as not many of us use docker, so we are lacking knowledge and experience about it.
    Last edited: May 5, 2024
  3. Kahuitel

    Kahuitel New Member

    Salut Keoz !

    I've done that but to be honest, I'm not totally sure of how I've made it !

    I'll post here some settings, if you need any other info, just tell me !
    Here is my ISPCONFIG settings (Website / options / apache directives) :
    # Necessary for letsencrypt renewal with ISPConfig
    ProxyPass /.well-known/ !
    # Enabling SSL support
    SSLProxyEngine on
    SSLProxyVerify none
    # Use RewriteEngine to handle websocket connection upgrades
    RewriteEngine On
    RewriteCond %{HTTP:Connection} Upgrade [NC]
    RewriteCond %{HTTP:Upgrade} websocket [NC]
    RewriteRule /(.*) ws://$1 [P,L]
    # preserve Host header to avoid cross-origin problems
    ProxyPreserveHost on
    ProxyRequests Off
    ProxyPass /
    ProxyPassReverse /
    And here are my Azuracast settings :
    .env file (watch out it is an hidden file) :
    [email protected]
    my azuracast.env file :
    # AzuraCast Customization
    # The application environment.
    # Valid options: production, development, testing
    # Prefer release versions over always-updating "rolling" releases.
    # Valid options: true, false
    # Enable the composer "merge" functionality to combine the main application's
    # composer.json file with any plugins' composer files.
    # This can have performance implications, so you should only use it if
    # you use one or more plugins with their own Composer dependencies.
    # Valid options: true, false
    # The minimum port number to use when automatically assigning ports to a station.
    # By default, this matches the first forwarded port on the "stations" container.
    # You can modify this variable if your station port range is different.
    # Be sure to also forward the necessary ports via `docker-compose.yml`
    # (and nginx, if you want to use the built-in port-80/443 proxy)!
    # The maximum port number to use when automatically assigning ports to a station.
    # Database Configuration
    # --
    # Once the database has been installed, DO NOT CHANGE these values!
    # The host to connect to. Leave this as the default value unless you're connecting
    #   to an external database server.
    # Default: mariadb
    # The port to connect to. Leave this as the default value unless you're connecting
    #   to an external database server.
    # Default: 3306
    # The username AzuraCast will use to connect to the database.
    # Default: azuracast
    # The password AzuraCast will use to connect to the database.
    # By default, the database is not exposed to the Internet at all and this is only
    #   an internal password used by the service itself.
    # Default: ***
    # The name of the AzuraCast database.
    # Default: azuracast
    # Automatically generate a random root password upon the first database spin-up.
    #   This password will be visible in the mariadb container's logs.
    # Default: yes
    # Log slower queries for the purpose of diagnosing issues. Only turn this on when
    #   you need to, by uncommenting this and switching it to 1.
    # To read the slow query log once enabled, run:
    #   docker-compose exec mariadb slow_queries
    # Default: 0
    # Advanced Configuration
    # Override the IP/hostname to use when negotiating inbound FTP Passive Mode (PASV) connections.
    # The system will attempt to automatically detect this, so you often don't need to change it.
    # FTP_PASV_IP=localhost
    # PHP's maximum POST body size and max upload filesize.
    # PHP's maximum memory limit.
    # PHP's maximum script execution time (in seconds).
    # Maximum number of PHP-FPM worker processes to spawn.
    # Create additional media sync worker processes.
    #   This setting can be used to increase the performance of the media sync process
    #   by creating additional worker processes to consume messages
    # Default: 0
    the docker-compose.override.yml file :
    version: '2.2'
          - /etc/letsencrypt/live/
          - /etc/letsencrypt/live/
          - /var/www/mypath/downloads:/var/azuracast/stations/webradio/media
          - /var/www/mypath/downloads:/var/azuracast/stations/webradio/media
    ahrasis likes this.
  4. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    i've just had a look at the, figuring it may be possible to install manually in an ispconfig created webspace.
    the install script is going to install ansible and then install azuracast using ansible.. this alone doesn't make it impossible to do, you could still run through what ansible would do, manually adjusting for your system.
    the problem is the once of the first things it does is look for installed versions of apache or lighthttp, and if they exist, remove then and then install nginx.

    so that's not really going to work on an already installed ispconfig server running apache.

    i don't really have any experience with docker, so i can't help with that, but i suspect a docker instance running within an ispconfig created webspace is not going to be easy to do...

    i'd suspect your best chance of getting it working on your ispconfig server is to look for instructions for manually installing azuracast on an apache webserver and adjusting those instructions to work with ispconfig.

    or to install your azuracast docker instances as normal running on their own ports, and then create a website in ispconfig for them, and use that to proxy to the docker http/https ports, so the vhost config ends up containing something like:
    <VirtualHost *:80>
      <Proxy *>
       Allow from localhost
      ProxyPass        / http://local.hostname.ofDockerHost:12345/
      ProxyPassReverse / http://local.hostname.ofDockerHost:12345/
    <VirtualHost *:443>
      <Proxy *>
       Allow from localhost
      ProxyPass        / http://local.hostname.ofDockerHost:12346/
      ProxyPassReverse / http://local.hostname.ofDockerHost:12346/
  5. Keoz

    Keoz Member

    I will
    Thanks but Azuraccast developpers or community have stopped providing support upon installation with ansible (and ISP Config panel). I wished to give it a try, but I finally opt for an installation with docker (after I successfully tested it).

  6. TonyG

    TonyG Active Member

    I know nothing about Azuracast and I understand you have this working with Docker. To get this working in a standard ISPConfig install these points might help:

    You said earlier that you wanted to get the software installed to /web1/web/azuracast. The default config will point to /web, so you need an index.php or similar in there to accept the initial visitor request. So if you have a file like /azuracast/index.php, you need to move everything in there up a level.

    If you want a vhost to go to a different port, do this:

    1) Setup and test a normal vhost subdomain, like azuracast.doman.tld which goes to /web1/azuracast.
    2) Test to ensure that works.
    3) Generate a SSL cert on that.
    4) Delete the default index and other files and install azuracast in there.
    5) To access under a different port, go back into the subdomain > Options, and in the Apache configs set this:

    # this terminates the main vhost definition
    # start a new vhost definition for a different port
    <VirtualHost *:12345>
    ServerName azuracast.domain.tld
    ServerAdmin [email protected]
    # Copy here everything required from the VirtualHost node in /etc/apache2/sites-available/azuracast.domain.tld.vhost
    # Only the HTTPS/SSL code should be required.
    # Do NOT include a trailing /VirtualHost - it's already in the file.
    6) systemctl restart apache2

    At this point VirtualHost definitions exist for ports 80, 443, and 12345. I'm not sure of the proper ISPConfig way to handle that situation.

    Anyone - is this wrong? TY

Share This Page