Coming soon
This site is under construction.
{{host}}
package main import ( "html" "net" "net/http" "strings" ) // A decoy answers every web path like a freshly installed web server: the // front page is its stock welcome page and everything else is its stock // error page. Only /api/v1 and live setup links get past it. type decoyPage struct { server string // Server header, "" for none index func(host string) string // the front page error func(code int, r *http.Request) string // body for 404 and 405 } var decoyPages = map[string]decoyPage{ "nginx": {server: nginxServer, index: func(string) string { return nginxIndex }, error: nginxError}, "apache": {server: apacheServer, index: func(string) string { return apacheIndex }, error: apacheError}, "soon": {index: soonIndex, error: soonError}, } // serveDecoy writes the decoy's answer for r. It drops the headers the web // interface adds, since a stock server sends none of them. func serveDecoy(w http.ResponseWriter, r *http.Request, name string) { d, ok := decoyPages[name] if !ok { d = decoyPages["nginx"] } h := w.Header() for _, k := range []string{"Content-Security-Policy", "X-Content-Type-Options", "Referrer-Policy", "X-Frame-Options", "Strict-Transport-Security", "Cache-Control"} { h.Del(k) } if d.server != "" { h.Set("Server", d.server) } h.Set("Content-Type", "text/html") code, body := http.StatusOK, "" switch { case r.Method != http.MethodGet && r.Method != http.MethodHead: code, body = http.StatusMethodNotAllowed, d.error(http.StatusMethodNotAllowed, r) case r.URL.Path == "/" || r.URL.Path == "/index.html": body = d.index(hostOnly(r.Host)) default: code, body = http.StatusNotFound, d.error(http.StatusNotFound, r) } w.WriteHeader(code) if r.Method != http.MethodHead { _, _ = w.Write([]byte(body)) } } func hostOnly(hostport string) string { if h, _, err := net.SplitHostPort(hostport); err == nil { return h } return hostport } func hostPort(r *http.Request) string { if _, p, err := net.SplitHostPort(r.Host); err == nil { return p } if r.TLS != nil { return "443" } return "80" } const nginxServer = "nginx/1.24.0 (Ubuntu)" const nginxIndex = `
If you see this page, the nginx web server is successfully installed and working. Further configuration is required.
For online documentation and support please refer to
nginx.org.
Commercial support is available at
nginx.com.
Thank you for using nginx.
` func nginxError(code int, _ *http.Request) string { status := statusLine(code) return "\r\nThe requested URL was not found on this server.
" if code == http.StatusMethodNotAllowed { msg = "The requested method " + html.EscapeString(r.Method) + " is not allowed for this URL.
" } return "\n\nThis site is under construction.
{{host}}
This is the default welcome page used to test the correct operation of the Apache2 server after installation on Ubuntu systems. It is based on the equivalent page on Debian, from which the Ubuntu Apache packaging is derived. If you can read this page, it means that the Apache HTTP server installed at this site is working properly. You should replace this file (located at /var/www/html/index.html) before continuing to operate your HTTP server.
If you are a normal user of this web site and don't know what this page is about, this probably means that the site is currently unavailable due to maintenance. If the problem persists, please contact the site's administrator.
Ubuntu's Apache2 default configuration is different from the upstream default configuration, and split into several files optimized for interaction with Ubuntu tools. The configuration system is fully documented in /usr/share/doc/apache2/README.Debian.gz. Refer to this for the full documentation. Documentation for the web server itself can be found by accessing the manual if the apache2-doc package was installed on this server.
The configuration layout for an Apache2 web server installation on Ubuntu systems is as follows:
/etc/apache2/
|-- apache2.conf
| ` + "`" + `-- ports.conf
|-- mods-enabled
| |-- *.load
| ` + "`" + `-- *.conf
|-- conf-enabled
| ` + "`" + `-- *.conf
|-- sites-enabled
| ` + "`" + `-- *.conf
By default, Ubuntu does not allow access through the web browser to any file outside of those located in /var/www, public_html directories (when enabled) and /usr/share (for web applications). If your site is using a web document root located elsewhere (such as in /srv) you may need to whitelist your document root directory in /etc/apache2/apache2.conf.
The default Ubuntu document root is /var/www/html. You can make your own virtual hosts under /var/www.
Please use the ubuntu-bug tool to report bugs in the Apache2 package with Ubuntu. However, check existing bug reports before reporting a new bug.
Please report bugs specific to modules (such as PHP and others) to their respective packages, not to the web server itself.