nginx configuration

Discussion in 'Installation/Configuration' started by, Jan 16, 2015.

  1. Member

    The nginx-configuration by ispconfig apparently lacks efficiency.

    My OS: CentOS7
    Version: latest + HHVM patch

    1. SEO-redirects are implemented by if-statements
    2. subdomain responses (eg. *) is done by wildcards and if statement
    3. ...

            if ($http_host ~* "^(.+)\.example\.com$") {
                rewrite ^ $scheme://$request_uri? permanent;
    The more efficient solution would be a seperate server statement:
    server {
      server_name *;
      return 301 $scheme://$request_uri;
    Am aware there is an issue implementing it, since it is a new server statement.
    1. Am I mssing something?
    2. Any chance to change nginx implementation by adding a 2nd nginx options-window, which actually adds another server block?
  2. Member

    Alternatively: make rewrites a seperate vhost-file

Share This Page