Dev Space
DemoGitHubDiscord Server
  • 🏠Dev Space
  • 💡Features
  • 📄Changelogs
  • â„šī¸Credits
  • Guides
    • What is docker?
    • 🌐Website Guides
      • Install Dev Space Website
      • Setup Web Server
      • Setup SSL Certificate
    • ⚡Agent Guides
      • Install Dev Space Agent
  • MongoDB Guides
    • MongoDB Admin
  • Accounts
    • 🙂Profile
  • Teams
    • đŸ˜ī¸Teams
    • 🔒Permissions
    • 🤖API
      • Client
      • Console
      • Docker
      • Members
      • Roles
      • Servers
      • Users
      • Models
  • Team Resources
    • đŸ–Ĩī¸Servers
    • 🎮Consoles
Powered by GitBook
On this page
  1. Guides
  2. Website Guides

Setup Web Server

PreviousInstall Dev Space WebsiteNextSetup SSL Certificate

Last updated 1 day ago

The Dev Space website requires you to setup a web server using either Nginx or Apache,

Here is a link on how to setup nginx for ubuntu or you can search.

Download the nginx config below or see the 2 examples below.

Nginx Config
server {
	listen 443 ssl;
	server_name example.com;
	root /usr/share/nginx/www;
		
	location / {
		proxy_pass http://127.0.0.1:5556/;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_set_header X-Forwarded-Proto $scheme;
		proxy_set_header Upgrade $http_upgrade;
		proxy_set_header Connection $http_connection;
		proxy_set_header Host $host;
		proxy_cache_bypass $http_upgrade;
	}

	ssl                  on;
    	ssl_certificate      /cert.pem;
    	ssl_certificate_key  /key.pem;
}
Apache Config
<VirtualHost *:443>
    ServerName example.com
    
    RewriteEngine On
    ProxyPreserveHost On
    
    ProxyPass / http://localhost:5556/
    ProxyPassReverse / http://localhost:5556/
        
    RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC] 
    RewriteCond %{HTTP:CONNECTION} Upgrade$ [NC]
    RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
    RewriteRule /(.*) ws://127.0.0.1:5556/$1 [P]    
</VirtualHost>
🌐
How To Install Nginx on Ubuntu 20.04 | DigitalOcean
Logo
546B
devspace_nginx.conf