This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
expertus_meeting_application_setup [2021/07/30 12:58] 157.51.114.165 |
expertus_meeting_application_setup [2021/07/30 13:39] (current) 157.51.114.165 [Nginx configuration] |
||
|---|---|---|---|
| Line 92: | Line 92: | ||
| clone expertus meeting application inside meeting directory | clone expertus meeting application inside meeting directory | ||
| - | **cd meeting | + | **cd meeting** |
| - | svn checkout https://repos.exphosted.com/svnrepos/meeting/server/trunk** | + | **svn checkout https://repos.exphosted.com/svnrepos/meeting/server/trunk** |
| install the required gems, with bundle command | install the required gems, with bundle command | ||
| - | **cd trunk | + | **cd trunk** |
| - | bundle install** | + | **bundle install** |
| Now, the capistrano gem is installed and ready for the deployment | Now, the capistrano gem is installed and ready for the deployment | ||
| Line 107: | Line 107: | ||
| Above command will start deploy the meeting application to the actual directory, for that we need to create apps folder inside the home directory | Above command will start deploy the meeting application to the actual directory, for that we need to create apps folder inside the home directory | ||
| - | **cd /home/expdev01/ | + | **cd /home/expdev01/** |
| - | mkdir apps | + | **mkdir apps** |
| - | cd apps | + | **cd apps** |
| - | mkdir meeting** | + | **mkdir meeting** |
| Copy shared files | Copy shared files | ||
| Line 128: | Line 128: | ||
| once the deployment is success, can start/stop puma server with below 2 commands | once the deployment is success, can start/stop puma server with below 2 commands | ||
| - | **cap production puma:stop | + | **cap production puma:stop** |
| - | cap production puma:start** | + | **cap production puma:start** |
| If you face, any problem while start puma server, run the below command to start puma | If you face, any problem while start puma server, run the below command to start puma | ||
| **RBENV_ROOT=~/.rbenv RBENV_VERSION=2.6.3 ~/.rbenv/bin/rbenv exec bundle exec puma -C /home/expdev01/apps/meeting/shared/puma.rb –daemon** | **RBENV_ROOT=~/.rbenv RBENV_VERSION=2.6.3 ~/.rbenv/bin/rbenv exec bundle exec puma -C /home/expdev01/apps/meeting/shared/puma.rb –daemon** | ||
| + | |||
| + | =====Nginx configuration===== | ||
| + | |||
| + | configure nginx add below code to nginx configuration file and the restart the nginx service | ||
| + | file - /etc/nginx/sites-enabled/bigbluebutton | ||
| + | |||
| + | |||
| + | upstream app_meeting { | ||
| + | server unix:///home/expdev01/apps/meeting/shared/tmp/sockets/meeting-puma.sock fail_timeout=0; | ||
| + | } | ||
| + | |||
| + | server { | ||
| + | listen 80; | ||
| + | server_name dev01meet.exphosted.com; | ||
| + | return 301 https://dev01meet.exphosted.com$request_uri; | ||
| + | } | ||
| + | |||
| + | server { | ||
| + | #listen 80; | ||
| + | #listen 443 ssl; | ||
| + | #listen 443 ssl http2 default; | ||
| + | listen 443 ssl; | ||
| + | #listen [::]:443 ssl http2; | ||
| + | server_name dev01meet.exphosted.com; | ||
| + | gzip_static on; | ||
| + | gzip on; | ||
| + | gzip_comp_level 6; | ||
| + | gzip_min_length 256; | ||
| + | gzip_proxied any; | ||
| + | gzip_vary on; | ||
| + | gzip_buffers 24 64k; | ||
| + | gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy; | ||
| + | |||
| + | client_max_body_size 4G; | ||
| + | root /home/expdev01/apps/meeting/current/public; | ||
| + | access_log /home/expdev01/apps/meeting/current/log/nginx-access.log; | ||
| + | error_log /home/expdev01/apps/meeting/current/log/nginx-error.log; | ||
| + | |||
| + | ssl_certificate /etc/nginx/ssl/server.crt; | ||
| + | ssl_certificate_key /etc/nginx/ssl/server.key; | ||
| + | ssl_protocols TLSv1.2; | ||
| + | ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256'; | ||
| + | ssl_prefer_server_ciphers on; | ||
| + | |||
| + | location ~* ^/assets/ { | ||
| + | add_header 'Access-Control-Allow-Origin' '*'; | ||
| + | proxy_set_header Host $host; | ||
| + | proxy_set_header X-Real-IP $remote_addr; | ||
| + | proxy_set_header X-Forwarded-Proto https; | ||
| + | proxy_set_header X-Forwarded-Proto $scheme; | ||
| + | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
| + | proxy_pass http://app_meeting; | ||
| + | } | ||
| + | | ||
| + | location / { | ||
| + | add_header 'Access-Control-Allow-Origin' '*'; | ||
| + | add_header 'Access-Control-Allow-Credentials' 'true'; | ||
| + | add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; | ||
| + | add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,X-Forwarded-For,content-length'; | ||
| + | proxy_http_version 1.1; | ||
| + | proxy_set_header Host $host; | ||
| + | proxy_set_header X-Real-IP $remote_addr; | ||
| + | proxy_set_header X-Forwarded-Proto https; | ||
| + | proxy_set_header X-Forwarded-Proto $scheme; | ||
| + | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
| + | proxy_pass http://app_meeting; | ||
| + | } | ||
| + | |||
| + | location /cable { | ||
| + | proxy_pass http://app_meeting; | ||
| + | proxy_http_version 1.1; | ||
| + | proxy_set_header Upgrade $http_upgrade; | ||
| + | proxy_set_header Connection "Upgrade"; | ||
| + | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
| + | proxy_set_header Host $http_host; | ||
| + | proxy_set_header X-Real-IP $remote_addr; | ||
| + | proxy_set_header X-Forwarded-Proto https; | ||
| + | proxy_redirect off; | ||
| + | } | ||
| + | error_page 500 502 503 504 /50x.html; | ||
| + | location = /50x.html { | ||
| + | root /usr/share/nginx/html; | ||
| + | } | ||
| + | } | ||
| + | |||