Giter Club home page Giter Club logo

Comments (3)

gaecom avatar gaecom commented on August 18, 2024

The following is my nginx configuration

upstream b888 {
server 127.0.0.1:8888;
}
upstream b443 {
server 127.0.0.1:8443;
}
upstream b889 {
server 127.0.0.1:8889;
}

server
{
listen 443;
server_name w.cc;
large_client_header_buffers 8 32k;

ssl on;
ssl_certificate /Users/chjade/w.cc.cert;
ssl_session_timeout 5m;
ssl_protocols  SSLv2 SSLv3 TLSv1;
ssl_ciphers  HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers   on;
ssl_certificate_key /Users/chjade/w.cc.key;
root  /Users/chjade/htdocs/wrtc_start/public;
index index.php index.html index.htm;




set $flag 0;

if ($request_uri !~* "/socket.io/")
{
    set $flag "${flag}1";

}
if ($request_uri !~* "/channel/")
{
set $flag "${flag}2";

}
if ($request_uri !~* "/ws/buffalo")
{
set $flag "${flag}3";

}
location /ws/buffalo {
access_log off;
proxy_pass http://b889;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

# WebSocket support (nginx 1.4)
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

# Path rewriting
rewrite /ws/buffalo/(.*) /$1 break;
proxy_redirect off;
}
location /socket.io/
{
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;

# prevents 502 bad gateway error
proxy_buffers 8 32k;
proxy_buffer_size 64k;

proxy_pass https://b443;
proxy_redirect off;

# enables WS support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

break;

}
location  /channel
{
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;

# prevents 502 bad gateway error
proxy_buffers 8 32k;
proxy_buffer_size 64k;

proxy_pass https://b443;
proxy_redirect off;

# enables WS support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
rewrite /channel/(.*) /$1;

break;

}
if (!-e $request_filename) {
        set $flag "${flag}4";
}
if ($flag = '01234') {
rewrite ^/(.*)  /index.php/$1 last;
}


location ~ ^.+\.php {

root        /Users/chjade/htdocs/wrtc_start/public;
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
fastcgi_pass 127.0.0.1:9001;

fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param  SCRIPT_FILENAME /Users/chjade/htdocs/wrtc_start/public$fastcgi_script_name;
fastcgi_param PATH_TRANSLATED /Users/chjade/htdocs/wrtc_start/public$fastcgi_path_info;
include fastcgi.conf;
}
location ~ .*\.(js|css)?$
{
expires      12h;
}



}

from elephant.io.

Taluu avatar Taluu commented on August 18, 2024

Could you test on the master branch ? Thanks

from elephant.io.

Taluu avatar Taluu commented on August 18, 2024

As there are no response, closing this ticket (especially as the legacy branch is not really supported anymore)

from elephant.io.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.