Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using ISPConfig on Ubuntu. I want to have separate configs for port 80 and 443 but if I try to add a second server in ISPConfig it won't let me b/c I already have one of the same name.

And anything I add into 'nginx directives' under the Options tab goes in the server block already, so it's already listening on port 80.

share|improve this question

closed as off-topic by HopelessN00b Mar 3 '15 at 8:00

  • This question does not appear to be about server, networking, or related infrastructure administration within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

First thing you should do is copy the original configuration file to a save location so you can customize it. ISPConfig has a built-in conf-custom folder. When ever a file is places in there, having the same name as a server/system/ISPConfig config file, it gets overwritten:

    cp /usr/local/ispconfig/server/conf/nginx_vhost.conf.master /usr/local/ispconfig/server/conf-custom/

Now you can edit the copied file:

    nano /usr/local/ispconfig/server/conf-custom/nginx_vhost.conf.master

You'll find parts like this:

    <tmpl_if name='ssl_enabled'>

Everything in there will only be applied to SSL enabled sites. So you could create 2 "master blocks" like:

    <tmpl_if name='ssl_enabled'>
        (everything SSL goes here)
        (everything non SSL goes here)

That way, you can have two different ways ISPConfig creates the vhosts.

share|improve this answer
Obviously, @MaddinXx meant to group server block code in <tmpl_> processing code blocks and that (as of ISPConfig works to keep the ISPConfig process from throwing 'duplicate' errors when building the config from the (ispconfig/server/conf/.conf.master) template. But the 'else' block in his example above will drop one server block (:80) for the other (:443) if ssl_enabled. And, it's not enough to 'enable' SSL in the domain tab, you have to generate a certificate in the SSL tab to get ssl_enabled to return a 1. – Ricalsin Sep 11 '14 at 5:51

Not the answer you're looking for? Browse other questions tagged or ask your own question.