Web Servers
Managed Web Servers run Nginx or Apache for you — the platform provisions the VM, installs and configures the web server (optionally with PHP), binds your domains, deploys your content, and can publish the site to the internet on demand.
Create a web server
In the portal, go to Web Servers → Instances → Create and choose:
- Type — Nginx or Apache, and a version (the launchable versions are in the dropdown; the recommended one is marked).
- Flavor — the size, from the
web.co1.*family (small…xlarge). - Storage — disk size for the document root.
- VPC + subnet.
- PHP — optionally enable PHP and pick a version (8.1 / 8.2 / 8.3).
From the CLI
Lifecycle commands are type-specific (fm webserver nginx … / fm webserver apache …).
fm webserver nginx instance create \
--name site-1 \
--version 1.30 \
--flavor web.co1.small \
--storage 20 \
--vpc my-vpc \
--subnet my-subnet \
--php-enabled --php-version 8.3
# Apache is symmetric: fm webserver apache instance create …With Terraform
resource "frostmoln_nginx_instance" "site" {
name = "site-1"
version = "1.30"
flavor_id = "web.co1.small"
storage_gb = 20
vpc_id = frostmoln_vpc.main.id
subnet_id = frostmoln_subnet.main.id
php_enabled = true
php_version = "8.3"
}(frostmoln_apache_instance is the Apache equivalent.)
PHP is fixed for the life of an instance
Enabling PHP or changing the PHP version requires recreating the instance — it can't be toggled on a running web server. Pick the version you need at create time.
HTTPS inside your VPC
Every new web server serves HTTPS on port 443 with a certificate from the Frostmoln customer CA, issued for the instance's internal hostname: <label>.web.<vpc-label>.<tenant-label>.<org-label>.fm.internal. That name resolves only inside the instance's VPC (see Internal DNS names), and only a client that trusts the Frostmoln CA bundle accepts the certificate. It secures traffic from your own instances in the VPC, such as an application server or an App Gateway; it is not a certificate for browsers. <label> comes from the instance's name at create, by the same rule as for databases, with web for a name that has no letters or digits. Copy the hostname from the instance rather than building it yourself.
tlsEnabled (tls_enabled in Terraform, TLS Enabled in fm webserver nginx instance get) is read-only: it turns true once the instance serves its certificate. The portal shows the TLS state, the hostname and the Download CA bundle button. port stays the HTTP port, 80.
Verify the certificate against the bundle and the hostname, from an instance in the same VPC:
fm pki ca-bundle --file frostmoln-customer-ca.pem
curl --cacert frostmoln-customer-ca.pem https://<hostname>/Require TLS
Require TLS decides what port 80 does. It is off by default.
- Off (the default): the site is served on port 80 and on HTTPS on 443.
- On (the Require TLS switch in the create form,
--require-tlsinfm,require_tls = truein Terraform): the site is served on HTTPS only. Port 80 serves no content; it answers every request with a301redirect tohttps://on the same host name and path.
The redirect sends public visitors to a certificate error
The certificate names only the internal hostname. A public visitor who opens http://www.example.com/ on an exposed web server with Require TLS on is redirected to https://www.example.com/, and the browser refuses the certificate: it is issued for the internal name, not www.example.com, by a CA the browser does not trust. Turn Require TLS on only for a web server that is reached from inside your VPC. Serve public HTTPS as described in Public HTTPS.
The setting is fixed when the instance is created. To change it, create a new instance (in Terraform, changing require_tls replaces the instance; an API update that sends a different requireTls is refused with 400 require_tls_immutable).
TLS for web servers is switched on separately on the platform. Until it is available, a new web server serves plain HTTP on port 80 only, the portal does not offer the switch, and a create that asks for Require TLS is refused with 400 require_tls_unavailable.
fm webserver nginx instance create \
--name intranet \
--version 1.30 \
--flavor web.co1.small \
--storage 20 \
--vpc my-vpc \
--subnet my-subnet \
--require-tlsIn Terraform, do not set tls_enabled: it is read-only, and a configured value is refused at plan time on a new instance. Read it, with hostname:
resource "frostmoln_nginx_instance" "intranet" {
name = "intranet"
version = "1.30"
flavor_id = "web.co1.small"
storage_gb = 20
vpc_id = frostmoln_vpc.main.id
subnet_id = frostmoln_subnet.main.id
# Port 80 only redirects to https. Omitted (false): the site is served on 80 too.
# Changing it replaces the instance.
require_tls = true
}
# The internal HTTPS address (inside the VPC); null on an instance without TLS.
output "intranet_url" {
value = frostmoln_nginx_instance.intranet.tls_enabled ? "https://${frostmoln_nginx_instance.intranet.hostname}/" : null
}Public HTTPS
To serve your site over HTTPS under your own domain, put an App Gateway in front of the web server. Its HTTPS listener serves the certificate for your domain, and it re-encrypts to the web server on 443, verifying the web server's certificate against the CA bundle and its hostname. See A Frostmoln managed instance as the backend. Installing a certificate of your own on the web server itself is not available yet.
Instances without TLS
Web servers created before TLS for web servers was available have no certificate and get none later. They serve plain HTTP on port 80 only, report tlsEnabled and requireTls as false, and have no hostname. To get HTTPS inside the VPC, create a new instance and deploy your content to it.
A web server that requires TLS but has no certificate serves no usable site: it is in status error. Delete it and create a new one.
Deploy content
Publish your site by uploading a .tar.gz archive of your document root. The platform unpacks it into a new release directory and atomically swaps the live symlink to it, so the switch-over is instant and the previous release is kept for rollback.
In the portal, open the web server's detail page and use the Deploy tab to upload an archive; the deploy history is listed there.
From the CLI
# Deploy an archive to an instance
fm webserver nginx deploy <instance-id> ./site.tar.gz
# List previous deployments (newest first)
fm webserver nginx deploys list <instance-id>
# Apache: fm webserver apache deploy … / fm webserver apache deploys list …With Terraform
resource "frostmoln_webserver_deployment" "site" {
instance_id = frostmoln_nginx_instance.site.id
source_archive = "${path.module}/site.tar.gz"
}Terraform tracks the archive's content hash — rebuild site.tar.gz and the next terraform apply pushes a new deployment automatically.
Configuration
A small, curated set of settings can be adjusted without touching raw Nginx/Apache config. The keys are the same for both types:
| Key | What it controls |
|---|---|
indexFiles | Index filenames tried for a directory request (e.g. index.html index.php) |
spaFallback | Serve index.html for unmatched routes (single-page-app fallback) |
clientMaxBodySize | Maximum request/upload body size (e.g. 25m) |
gzip | Enable gzip compression of responses |
securityHeaders | Send a baseline set of security response headers |
error404Page | Path to a custom 404 page |
error500Page | Path to a custom 500 page |
In the portal, use the Config tab on the web server's detail page.
From the CLI
# Show the current configuration
fm webserver nginx config get <instance-id>
# Set a value
fm webserver nginx config set <instance-id> spaFallback=true
fm webserver nginx config set <instance-id> clientMaxBodySize=25mWith Terraform
Set the config map on the instance resource:
resource "frostmoln_nginx_instance" "site" {
# … create arguments as above …
config = {
indexFiles = "index.html index.htm"
spaFallback = "true"
clientMaxBodySize = "25m"
gzip = "true"
securityHeaders = "true"
}
}Domains
Bind one or more domains to a running web server. The binding is a record on the platform: the server answers any hostname pointed at its IP, so it is DNS that makes a domain live — the binding marks which domains you consider yours and which one is the default.
fm webserver nginx domain add <instance-id> --name example.comBound domains get no certificate
The platform does not issue or renew certificates for a bound domain; the TLS flag on a binding records your intent only. The web server's own certificate covers its internal hostname, not your domain, so a browser that opens your domain over HTTPS on the server's public IP gets a certificate error. For HTTPS under your domain, see Public HTTPS.
(Or the frostmoln_webserver_domain Terraform resource.) Point your domain's DNS at the server's public IP (see below), and mark one domain as the default.
Publish to the internet
A managed web server is private by default — it gets a private IP and is reachable only from instances on the same VPC. To serve it to the public internet, expose it: the platform allocates a public IP, associates it with the server, and the instance then shows a public IP.
In the portal, use the Expose action on the instance.
From the CLI
fm webserver nginx expose <instance-id> # allocate + attach a public IP
fm webserver nginx unexpose <instance-id> # release it (back to private)With Terraform
resource "frostmoln_nginx_instance" "site" {
# … create arguments as above …
public = true
}Exposing allocates a billed public IP
Exposure allocates a public IP, which is billed for as long as it is held. Un-exposing the server — or deleting it — releases the public IP.
What is open, and to whom
Every web server gets its own security group — a firewall the platform creates and attaches when the instance is created. It allows inbound tcp/80 and tcp/443 from any source (0.0.0.0/0), and outbound traffic is unrestricted. While the server is private no public IP is associated, so nothing outside your VPC can reach it; once you expose it, those two ports are open to the whole internet.
Anything that can already route into your VPC — your other instances, a peering, a VPN — reaches 80/443 too, including the load balancer suggested below.
The group's id is on the instance (security_group_id in Terraform, and shown in the portal), so you can inspect its rules:
fm network security-group get <sg-id>The source range is not configurable yet
This group is managed by the platform: it is not intended for you to edit, and changes to it are normally rejected. That also means you cannot yet narrow 80/443 to your own address range. A future release will let you restrict the source; the default on existing servers will not change under you. If you need it restricted today, keep the web server private and put a load balancer or your own proxy in front of it.
Lifecycle and limits
- Start, stop, restart, resize (grow storage), and delete from the instance detail page or the CLI (
fm webserver nginx instance start|stop|restart|resize|delete). - PHP is fixed after create — to change it, recreate the instance.
- Require TLS is fixed after create, and a web server created without a certificate never gets one (see Instances without TLS).
- Rollback — the previous release is retained after each deploy.
- No built-in load balancing or autoscaling across web-server instances (put a load balancer in front for that).