VPS1Euro Dashboard Wiki

Complete client guide: infrastructure, services, account and support.

FR EN

Nginx server (reverse proxy / web hosting)

Install and configure Nginx as a web server or reverse proxy.

What this tutorial does

The tutorial "Nginx server (reverse proxy / web hosting)" helps you achieve this goal:

Install and configure Nginx as a web server or reverse proxy.

← Back to tutorials
1 profiles 17 steps 6 commands ~20 min

Debian/Ubuntu

  1. Install Nginx: apt install -y nginx
  2. Start and activate: systemctl enable --now nginx
  3. --- Create a virtual host ---
  4. Create /etc/nginx/sites-available/mysite.conf:
  5. server {
  6. listen 80;
  7. server_name example.com www.example.com;
  8. root /var/www/monsite;
  9. index index.php index.html;
  10. location / { try_files $uri $uri/ =404; }
  11. }
  12. Activate site: ln -s /etc/nginx/sites-available/monsite.conf /etc/nginx/sites-enabled/
  13. Test the configuration: nginx -t
  14. Reload Nginx: systemctl reload nginx
  15. --- Configure as a reverse proxy ---
  16. In the server block, replace location / with:
  17. location / { proxy_pass http://127.0.0.1:3000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; }