All guides

Set up Selvio on nginx

Two location blocks in the server block of your site, a configuration test, and a reload.

Where the rule goes

Open the configuration file of the site (often in /etc/nginx/sites-available/ or /etc/nginx/conf.d/) and paste the blocks inside the server { … } block that serves your domain over HTTPS.

The rule

For example.com, with the pages under /compare/. In the dashboard, the same rule is already filled in with your domain and path: copy it from there. If your pages exist in several languages, it has one more block per language (/fr/compare/…).

nginx.conf
# Selvio: the comparison pages of example.com. Inside the server block of the site.
location = /compare {
    proxy_pass https://pages.selvio.io/_h/example.com/compare/;
    proxy_set_header Host pages.selvio.io;
    proxy_ssl_server_name on;
}
location /compare/ {
    proxy_pass https://pages.selvio.io/_h/example.com/compare/;
    proxy_set_header Host pages.selvio.io;
    proxy_ssl_server_name on;
}

After

Test the configuration with nginx -t, then reload nginx (nginx -s reload or systemctl reload nginx). No restart is needed.

Check

Open https://example.com/compare/_selvio/proxy-check in a browser, or run this command. The address must answer 200 with this text: selvio-proxy example.com.

Terminal
curl -i https://example.com/compare/_selvio/proxy-check

Then click I deployed it, check in the dashboard: it reads the same address on your domain. The check works before anything is published.

Common pitfalls

The people leaving your competitor will read a page. Make it yours.

Enter your site: Selvio picks up your brand style, suggests your competitors and checks their prices.

Free, no credit card. Nothing goes live without you.