# Production Site Hosting

## Running a Production Server

{% hint style="warning" %}
go-live does not support HTTPS yet, but it is on the roadmap! We recommend Cloudflare for now to handle SSL.
{% endhint %}

Serving a site in production is trivial with go-live. This process is very efficient and can be used with small and inexpensive compute instances. An example of serving a production site is:

```
go-live --dir production-site/ --port 80 --quiet
```

![Running two servers side by side with Tmux. Note the different ports.](/files/-MPqeDFXPFECksXmYkdL)

### Recommended: Start the Process in tmux

To start a persistent session with tmux. Tmux means when you close your SSH session your server won't shut down. Learn about tmux: <https://www.hamvocke.com/blog/a-quick-and-easy-guide-to-tmux/>

```
$ tmux
$ go-live --dir production-site/ --port 80 --quiet
```

### Recommended: Using with a Frontend (nginx)

You can start nginx on the same host as go-live and use it to proxy connections.  Here is an example nginx.conf (located in /etc/nginx/nginx.conf) for example.com on Port 9000.  The go-live process runs on Port 9000, and users connect through nginx on Port 80.&#x20;

```
events {
  worker_connections  4096;  ## Default: 1024
}

http {
server {

    listen 80;
    listen [::]:80;
    server_name example.com;

    location ^~ /{
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_set_header X-NginX-Proxy true;
        proxy_pass    http://127.0.0.1:9000/;
    }
}
}
```

### Recommended: Using with a CDN (Cloudflare)

Cloudflare can provide caching and DDOS protection for your go-live server. We recommend setting up Cloudflare as the DNS provider and then proxying requests to your go-live server IP address on Port 80.\
\
Cloudflare can also provide HTTPS support for users who connect through it.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://antsankov.gitbook.io/go-live/usecases/production-site-hosting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
