1. 28
  1.  

  2. 7

    For being the default server, there does seem to be a lot of boilerplate config you still needs in the httpd config file. Why does one need to redefine the MIME types, are they not in there by default?

    1. 2

      Sometimes, the built-in media types are enough: text/css, text/html, text/plain, image/gif, image/png, image/jpeg, image/svg+xml, and application/javascript

      In addition, I merged the following lists:

    2. 3

      I never use the default server. A 404 or 500 is just about right.

      The reason is: I don’t want somebody figuring out what the webserver is just by connecting to it by ip address.

      A plain default and virtual domains solves this.

      1. 2

        I like replying with an error when the Host is the IP e.g. http://203.0.113.4

        The default http server will redirect to the default https server e.g. https://203.0.113.4

        The TLS certificate offered will be the first one listed in relayd and it won’t match. If the certificate is accepted, it will 404 error because the document root /var/www/htdocs/203.0.113.4 does not exist.

        1. 1

          When/why is relayd necessary?

          I remember it used to be, perhaps before httpd SNI support. But why now?

          1. 4

            The httpd TLS configuration for the server isn’t aware of the macro $HTTP_HOST which is the host from the HTTP Host header. As such, TLS options are hard-coded in httpd.conf. It won’t be possible to have a default https server for general use unless the TLS server is outsourced to relayd.

      2. 2

        Where would access.log be found in this case?

        1. 3

          /var/www/logs/access.log

          default chroot directory is /var/www

          default logdir directory is /logs

          default access log file is access.log

        2. 1

          does it support http/2 or http/1.x only ?

          1. 2

            relayd and httpd support HTTP/1.x

            hpack(3) may be included, one day, into relayd or httpd https://github.com/reyk/hpack

            1. 1

              thank you for that info. Hope they get it included in the future!