This topic contains 7 replies, has 3 voices, and was last updated by mmiasnikov 6 years, 5 months ago.
- Topic
Hi,
I have failed to configure my nginx to serve websocket. Please have a look at my configuration files. Let me know what I should change.
My port 8080 is open
123sudo docker psCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMESaee13a77bdb7 zhex900/orocommerce "run.sh" 12 days ago Up 12 days 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp, 0.0.0.0:3088->3088/tcp, 0.0.0.0:8080->8080/tcp orocommerceThis is the javascript error:
1WebSocket connection to 'wss://aws1.orotechnologies.com.au:8080/' failed: WebSocket opening handshake timed out123app/console clank:serverStarting ClankLaunching Ratchet WS Server on: 0.0.0.0:8080123456websocket_bind_address: 0.0.0.0websocket_bind_port: 8080websocket_frontend_host: '*'websocket_frontend_port: 8080websocket_backend_host: '*'websocket_backend_port: 8080123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122server {listen 80 default_server;#port_in_redirect off;server_name $host;root /var/www/web;#include /etc/nginx/snippets/letsencrypt.conf;if ( -f /srv/orocrm.maintance ) {return 503 'Sorry, we are on maintenance, please try again after several seconds.';}index app.php;# redirect to https only when it is not load balance# load balance will use http# if ($remote_addr != 45.76.118.143) {# return 301 https://$host$request_uri;# }try_files $uri $uri/ @rewrite;location @rewrite {rewrite ^/(.*)$ /app.php/$1;}location / {proxy_pass $host:8080;proxy_http_version 1.1;proxy_set_header Upgrade $http_upgrade;proxy_set_header Connection "upgrade";proxy_set_header Host $host;}# deny access to .htaccess files, if Apache's document root# concurs with nginx's onelocation ~ /\.ht {deny all;}# Set static files cache lifetimelocation ~* ^[^(\.php)]+\.(jpg|jpeg|gif|png|ico|css|pdf|ppt|txt|bmp|rtf|js)$ {access_log off; # disable logsexpires 1h; # cahe 1hadd_header Cache-Control public;}location ~ [^/]\.php(/|$) {fastcgi_split_path_info ^(.+?\.php)(/.*)$;if (!-f $document_root$fastcgi_script_name) {return 404;}fastcgi_pass unix:/var/run/php-fpm.sock;fastcgi_index app.php;include fastcgi_params;fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;fastcgi_param PATH_INFO $fastcgi_path_info;fastcgi_param SYMFONY_ENV prod;fastcgi_intercept_errors on;fastcgi_ignore_client_abort off;fastcgi_connect_timeout 30;fastcgi_send_timeout 3600;fastcgi_read_timeout 3600;fastcgi_buffer_size 128k;fastcgi_buffers 4 256k;fastcgi_busy_buffers_size 256k;fastcgi_temp_file_write_size 256k;}}server {server_name $host;listen 443 ssl http2 default_server;listen [::]:443 ssl http2 default_server ipv6only=on;# aws1.orotechnologies.com.au is the host url e.g. app1.orocampus.com.aussl_certificate /etc/letsencrypt/live/aws1.orotechnologies.com.au/fullchain.pem;ssl_certificate_key /etc/letsencrypt/live/aws1.orotechnologies.com.au/privkey.pem;ssl_trusted_certificate /etc/letsencrypt/live/aws1.orotechnologies.com.au/fullchain.pem;include /etc/nginx/snippets/ssl.conf;root /var/www/web;index app.php;try_files $uri $uri/ @rewrite;location @rewrite {rewrite ^/(.*)$ /app.php/$1;}# deny access to .htaccess files, if Apache's document root# concurs with nginx's onelocation ~ /\.ht {deny all;}# Set static files cache lifetimelocation ~* ^[^(\.php)]+\.(jpg|jpeg|gif|png|ico|css|pdf|ppt|txt|bmp|rtf|js)$ {access_log off; # disable logsexpires 1h; # cahe 1hadd_header Cache-Control public;}location ~ [^/]\.php(/|$) {fastcgi_split_path_info ^(.+?\.php)(/.*)$;if (!-f $document_root$fastcgi_script_name) {return 404;}fastcgi_pass unix:/var/run/php-fpm.sock;fastcgi_index app.php;include fastcgi_params;fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;fastcgi_param PATH_INFO $fastcgi_path_info;fastcgi_param SYMFONY_ENV prod;fastcgi_intercept_errors on;fastcgi_ignore_client_abort off;fastcgi_connect_timeout 30;fastcgi_send_timeout 3600;fastcgi_read_timeout 3600;fastcgi_buffer_size 128k;fastcgi_buffers 4 256k;fastcgi_busy_buffers_size 256k;fastcgi_temp_file_write_size 256k;}}
The forum ‘OroCommerce’ is closed to new topics and replies.