Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
infrastructure:virtualisation:opennebula:frontend-install [18/05/2023 11:51] – Stéphane Paillet | infrastructure:virtualisation:opennebula:frontend-install [18/05/2023 12:44] (Version actuelle) – Stéphane Paillet | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | ====== Installation | + | ====== Installation |
{{tag> | {{tag> | ||
Ligne 125: | Ligne 125: | ||
< | < | ||
systemctl enable opennebula opennebula-sunstone opennebula-fireedge opennebula-gate opennebula-flow | systemctl enable opennebula opennebula-sunstone opennebula-fireedge opennebula-gate opennebula-flow | ||
+ | </ | ||
+ | |||
+ | ===== Proxy Nginx ===== | ||
+ | |||
+ | Nous installons Nginx | ||
+ | < | ||
+ | apt install nginx | ||
+ | </ | ||
+ | |||
+ | Nous configurons le vHost | ||
+ | |||
+ | < | ||
+ | vi / | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | ## | ||
+ | # Nginx vHost | ||
+ | # Application: | ||
+ | # Sources: | ||
+ | # https:// | ||
+ | # https:// | ||
+ | ## | ||
+ | |||
+ | # No squealing. | ||
+ | server_tokens off; | ||
+ | |||
+ | # OpenNebula Sunstone upstream | ||
+ | upstream sunstone { | ||
+ | server 127.0.0.1: | ||
+ | } | ||
+ | |||
+ | # OpenNebula fireedge upstream | ||
+ | upstream fireedge { | ||
+ | server 127.0.0.1: | ||
+ | } | ||
+ | |||
+ | # OpenNebula websocketproxy upstream | ||
+ | upstream websocketproxy { | ||
+ | server 127.0.0.1: | ||
+ | } | ||
+ | |||
+ | # HTTP virtual host, redirect to HTTPS | ||
+ | server { | ||
+ | listen 80; | ||
+ | server_name one.example.com; | ||
+ | return 301 https:// | ||
+ | } | ||
+ | |||
+ | # | ||
+ | # Example Sunstone configuration (/ | ||
+ | # | ||
+ | #: | ||
+ | #: | ||
+ | #: | ||
+ | #: | ||
+ | #: | ||
+ | #: | ||
+ | #: | ||
+ | |||
+ | # HTTPS virtual host, proxy to Sunstone | ||
+ | server { | ||
+ | listen 443 ssl; | ||
+ | server_name one.example.com; | ||
+ | ssl_certificate | ||
+ | ssl_certificate_key / | ||
+ | |||
+ | location / { | ||
+ | proxy_pass http:// | ||
+ | proxy_redirect | ||
+ | log_not_found | ||
+ | proxy_set_header | ||
+ | proxy_set_header | ||
+ | proxy_set_header | ||
+ | } | ||
+ | | ||
+ | location /websockify { | ||
+ | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
+ | proxy_set_header X-Real-IP $remote_addr; | ||
+ | proxy_set_header X-Forwarded-Host $host; | ||
+ | proxy_set_header X-Forwarded-Server $host; | ||
+ | proxy_set_header x-forwarded-proto | ||
+ | proxy_set_header Host $host; | ||
+ | proxy_buffering off; | ||
+ | proxy_http_version 1.1; | ||
+ | proxy_read_timeout 86400; | ||
+ | proxy_pass https:// | ||
+ | proxy_set_header Upgrade $http_upgrade; | ||
+ | proxy_set_header Connection " | ||
+ | } | ||
+ | } | ||
+ | |||
+ | # HTTPS virtual host, proxy to FireEdge | ||
+ | server { | ||
+ | listen 443 ssl; | ||
+ | server_name fireedge.example.com; | ||
+ | ssl_certificate | ||
+ | ssl_certificate_key / | ||
+ | |||
+ | location / { | ||
+ | proxy_pass http:// | ||
+ | proxy_redirect | ||
+ | log_not_found | ||
+ | proxy_set_header | ||
+ | proxy_set_header | ||
+ | proxy_set_header | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | cd / | ||
+ | ln -s / | ||
+ | </ | ||
+ | |||
+ | Nous testons la configuration et redémarrons | ||
+ | < | ||
+ | nginx -t | ||
+ | systemctl reload nginx.service | ||
</ | </ | ||