Twake
⬅️ Go on twake
  • ☀️ Twake
  • Getting started
    • ▶️Use Twake on twake.app
    • 🏗️Install on your server
      • 🎡Scale with Twake
    • ⚙️Configuration
      • 🔒Security
      • 🔗Custom domain + HTTPS
        • Apache2 configuration
      • 💌Configure mail server
      • 🎨Customisation
      • 🔌Connectors and plugins
      • 👨‍💻 Authentication modes
        • Using Keycloak (LDAP, OpenID and more)
        • Installing Twake with LemonLDAP (LDAP, OpenID and more)
  • How to use it
    • 👋Welcome to Twake !
    • 🧰Console
      • Users
    • 🏢Company & workspace
      • Invite user from Chat
      • Rights
    • 💠Applications
      • 💬Chat
        • Channels
        • Message
      • 📂Drive
        • File and folder
        • Share file with public link
      • 📆Calendar
      • ✅Tasks
      • 🔃Connectors
        • n8n
    • 🖥️Desktop and mobile app
    • 🔒Privacy
  • Developers API
    • 🏠Home
    • 🥇Getting started
      • Create your first application
      • Authenticate with Postman
      • Send a message with your application
      • Trigger action from command
    • ⚙️Application settings
      • Api
      • Display
      • Privileges
      • Identity
    • 📖API Reference
      • Webhook
      • Drive
      • Message
        • DELETE Request
        • POST Request
      • Authentication
    • 🧱Blocks
  • Internal Documentation
    • 🥇Get started
    • 🎨Twake Ecosystem Guidelines
    • 📚Our stack
    • 🧱Backend and APIs
      • 🔑(WIP) Authentication
      • 👥Users and workspaces
      • 🍎Applications
        • Database models
        • REST APIs
      • 🎩Channels and tabs
        • Database models
      • 💬Messages
        • Database models
      • 📄Files
        • Database models
        • REST APIs
        • Resumable.js
      • 📲Notifications
        • Database models
      • 🛠️Twake service development
        • What is a service in Twake ?
        • Create a new service
        • Platform/Technical services
          • Database ORM platform service
    • 🖥️Web, desktop and mobile
      • Table
      • ObjectModal
        • ObjectModalTitle
        • ObjectModalSeparator
        • ObjectModalSectionTitle
        • ObjectModalFormTitle
      • UserListManager
      • MediumPopupManager
      • MenuManager
    • 🎭Translation
Powered by GitBook
On this page

Was this helpful?

  1. Getting started
  2. Configuration
  3. Custom domain + HTTPS

Apache2 configuration

🙏 From Dahpril (community) https://github.com/TwakeApp/Twake/issues/76

Apache vhost

You need to create a vhost listening on port 443.

For exemple with certbot :

1. Create a vhost listening on port 80 with ServerName equals to your custom domain. Don't define any document root. 2. Then, use certbot to get a certificate and automatically create your vhost listening on port 443

sudo certbot --apache --email your_email -d your_domain --agree-tos --redirect --noninteractive

Reverse proxy

You have now to configure your reverse proxy directive. Head up to your 443 vhost configuration file and paste those directives (place them after server and ssl directives) :

RewriteEngine on
RewriteCond ${HTTP:Upgrade} websocket [NC]
RewriteCond ${HTTP:Connection} upgrade [NC]
RewriteRule .* "wss://127.0.0.1:8000/$1" [P,L]

ProxyRequests off

<Location />
    ProxyPass http://127.0.0.1:8000/
    ProxyPassReverse http://127.0.0.1:8000/
    ProxyPreserveHost On
</Location>
<Location /socketcluster>
    ProxyPass ws://127.0.0.1:8000/socketcluster
    ProxyPassReverse ws://127.0.0.1:8000/socketcluster
    ProxyPreserveHost On
</Location>

<Proxy *>
    AllowOverride All
    Order allow,deny
    Allow from All
</Proxy>

RequestHeader set X-Forwarded-port "80"

Be careful to NOT type trailing slash for ws location (it won't work).

I'm not sure that all directives are needed, but this configuration works for me.

Configuring remoteip

You also need to configure remoteip mod from apache with this command :

a2enmod remoteip

Then, edit /etc/apache2/conf-available/remoteip.conf to fit with this content :

RemoteIPHeader X-Real-IP
RemoteIPTrustedProxy 127.0.0.1 ::1

You can now enable the configuration of remoteip and restart Apache :

a2enconf remoteip
service apache2 restart
PreviousCustom domain + HTTPSNextConfigure mail server

Last updated 4 years ago

Was this helpful?

Return to the section "Configure domain name" of page to continue the configuration.

⚙️
🔗
Custom domain + HTTPS