DS1NMA Blog

vCenter Server를 Public에 오픈하면서 SSL 인증서를 걸어야 했는데,

Let's encrypt 적용을 위해 Nginx Proxy를 걸었는데, 접속이 안된다.

다음의 설정을 적용해야 동작한다.

server { 
   listen 443 ssl http2; 
   server_name my_internet_vcenter_fqdn; 
   ssl_certificate /etc/letsencrypt/live/my_letsencrypt_domain/fullchain.pem; 
   ssl_certificate_key /etc/letsencrypt/live/my_letsencrypt_domain/privkey.pem; 
   include /etc/letsencrypt/options-ssl-nginx.conf; 

   location / { 
      proxy_set_header Host "your_vCenter_fqdn"; 
      proxy_set_header Origin "your_vCenter_fqdn";
      proxy_set_header X-Real-IP $remote_addr; 
      proxy_ssl_verify off; 
      proxy_pass https://your_vCenter_fqdn; 
      proxy_http_version 1.1; 
      proxy_set_header Upgrade $http_upgrade; 
      proxy_set_header Connection "upgrade"; 
      proxy_buffering off; 
      client_max_body_size 0; 
      proxy_read_timeout 36000s; 
      proxy_redirect https://your_vCenter_fqdn/ https://my_internet_vcenter_fqdn/; 
   } 

   location /websso/SAML2 { 
      sub_filter "your_vCenter_fqdn" "my_internet_vcenter_fqdn"; 
      proxy_set_header Host your_vCenter_fqdn; 
      proxy_set_header X-Real-IP $remote_addr; 
      proxy_ssl_verify off; 
      proxy_pass https://your_vCenter_fqdn; 
      proxy_http_version 1.1; 
      proxy_set_header Upgrade $http_upgrade; 
      proxy_set_header Connection "upgrade"; 
      proxy_buffering off; 
      client_max_body_size 0; 
      proxy_read_timeout 36000s; 
      proxy_ssl_session_reuse on; 
      proxy_redirect https://your_vCenter_fqdn/ https://my_internet_vcenter_fqdn/; 
   } 
}

https://docs.requarks.io/install/linux

 

Linux

Getting started with a Wiki.js installation on Linux

docs.requarks.io

Install

    Download the latest version of Wiki.js:

wget https://github.com/Requarks/wiki/releases/latest/download/wiki-js.tar.gz

    Extract the package to the final destination of your choice:

mkdir wiki
tar xzf wiki-js.tar.gz -C ./wiki
cd ./wiki

    Rename the sample config file to config.yml:

mv config.sample.yml config.yml

    Edit the config file and fill in your database and port settings (Configuration Reference):

nano config.yml

    For SQLite installations only: (skip this step otherwise) Fetch native bindings for SQLite3:

npm rebuild sqlite3

    Run Wiki.js

node server

    Wait until you are invited to open to the setup page in your browser.
    Complete the setup wizard to finish the installation.

Run as service

There are several solutions to run Wiki.js as a background service. We'll focus on systemd in this guide as it's available in nearly all linux distributions.

    Create a new file named wiki.service inside directory /etc/systemd/system.

nano /etc/systemd/system/wiki.service

    Paste the following contents (assuming your wiki is installed at /var/wiki):

[Unit]
Description=Wiki.js
After=network.target

[Service]
Type=simple
ExecStart=/usr/bin/node server
Restart=always
# Consider creating a dedicated user for Wiki.js here:
User=nobody
Environment=NODE_ENV=production
WorkingDirectory=/var/wiki

[Install]
WantedBy=multi-user.target

    Save the service file (CTRL+X, followed by Y).
    Reload systemd:

systemctl daemon-reload

    Run the service:

systemctl start wiki

    Enable the service on system boot.

systemctl enable wiki

Note: You can see the logs of the service using journalctl -u wiki