[jitsi-dev] Strange behavior of internal URL router


#1

When i use "default" configuration, such as jitsi.mydomain.com, internal
URL redirect to random page, such as https://meet.jit.si/PoorKidsShootEasily
(based on history api) is always worked.

But, when i change domain to "bazaar.mydomain.com" (for example), internal
url routing does not worked, and i have "404" page answer from my apache
server.

My question: how to debug internal (SPA) router logic?

My apache config is:

<VirtualHost *:443>
  DocumentRoot "/opt/jitsi/jitsi-meet"
  ServerName bazaar.***.com
  SSLEngine on
  SSLProtocol all -SSLv2 -SSLv3
  SSLCipherSuite ALL:!DH:!EXPORT:!RC4:+HIGH:+MEDIUM:!LOW:!aNULL:!eNULL
  SSLCertificateFile /opt/jitsi/certs/*.crt
  SSLCertificateKeyFile /opt/jitsi/certs/private.key
  SSLCertificateChainFile /opt/jitsi/certs/ca/*.crt

  <Directory "/opt/jitsi/jitsi-meet">
    Options Indexes MultiViews
    AllowOverride All
    Order allow,deny
    Require all granted
    Allow from all
  </Directory>
   ProxyRequests Off
   ProxyPreserveHost Off
   ProxyPass /http-bind http://localhost:5280/http-bind/
   ProxyPassReverse /http-bind http://localhost:5280/http-bind/
</VirtualHost>

<VirtualHost *:80>
  DocumentRoot "/opt/jitsi/jitsi-meet"
  ServerName bazaar.****.com

  <Directory "/opt/jitsi/jitsi-meet">
    Options Indexes MultiViews
    AllowOverride All
    Order allow,deny
    Require all granted
    Allow from all
  </Directory>
   ProxyRequests Off
   ProxyPreserveHost Off
   ProxyPass /http-bind http://localhost:5280/http-bind/
   ProxyPassReverse /http-bind http://localhost:5280/http-bind/
</VirtualHost>

My jitsi-meet config is:
<VirtualHost *:443>
  DocumentRoot "/opt/jitsi/jitsi-meet"
  ServerName bazaar.***.com
  SSLEngine on
  SSLProtocol all -SSLv2 -SSLv3
  SSLCipherSuite ALL:!DH:!EXPORT:!RC4:+HIGH:+MEDIUM:!LOW:!aNULL:!eNULL
  SSLCertificateFile /opt/jitsi/certs/*.crt
  SSLCertificateKeyFile /opt/jitsi/certs/private.key
  SSLCertificateChainFile /opt/jitsi/certs/ca/*.crt

  <Directory "/opt/jitsi/jitsi-meet">
    Options Indexes MultiViews
    AllowOverride All
    Order allow,deny
    Require all granted
    Allow from all
  </Directory>
   ProxyRequests Off
   ProxyPreserveHost Off
   ProxyPass /http-bind http://localhost:5280/http-bind/
   ProxyPassReverse /http-bind http://localhost:5280/http-bind/
</VirtualHost>

<VirtualHost *:80>
  DocumentRoot "/opt/jitsi/jitsi-meet"
  ServerName bazaar.****.com

  <Directory "/opt/jitsi/jitsi-meet">
    Options Indexes MultiViews
    AllowOverride All
    Order allow,deny
    Require all granted
    Allow from all
  </Directory>
   ProxyRequests Off
   ProxyPreserveHost Off
   ProxyPass /http-bind http://localhost:5280/http-bind/
   ProxyPassReverse /http-bind http://localhost:5280/http-bind/
</VirtualHost>

var config = {
// configLocation: './config.json', // see ./modules/HttpConfigFetch.js
    hosts: {
        domain: 'bazaar.***.com',
        //anonymousdomain: 'guest.example.com',
        //authdomain: 'jitsi-meet.example.com', // defaults to <domain>
        muc: 'conference.bazaar.***.com', // FIXME: use XEP-0030
        bridge: 'jitsi-videobridge.bazaar.***.com', // FIXME: use XEP-0030
        //jirecon: 'jirecon.jitsi-meet.example.com',
        //call_control: 'callcontrol.jitsi-meet.example.com',
        focus: 'focus.bazaar.***.com', // defaults to '
focus.jitsi-meet.example.com'
    },
// getroomnode: function (path) { return 'someprefixpossiblybasedonpath';
},
// useStunTurn: true, // use XEP-0215 to fetch STUN and TURN server
// useIPv6: true, // ipv6 support. use at your own risk
    useNicks: false,
    bosh: '//bazaar.***.com/http-bind', // FIXME: use xep-0156 for that
    clientNode: 'https://jitsi.org/jitsimeet', // The name of client node
advertised in XEP-0115 'c' stanza
    focusUserJid: 'focus@auth.bazaar.***.com', // The real JID of focus
participant - can be overridden here
    //defaultSipNumber: '', // Default SIP number

Regards, Igor Akulov


#2

[snip]

You seem to be missing the part which does the redirection:

location ~ ^/([a-zA-Z0-9=\?]+)$ {
     rewrite ^/(.*)$ / break;
}

Regards,
Boris

···

On 21/01/16 06:48, Igor Akulov wrote:

When i use "default" configuration, such as jitsi.mydomain.com
<http://jitsi.mydomain.com>, internal URL redirect to random page, such
as https://meet.jit.si/PoorKidsShootEasily (based on history api) is
always worked.

But, when i change domain to "bazaar.mydomain.com
<http://bazaar.mydomain.com>" (for example), internal url routing does
not worked, and i have "404" page answer from my apache server.

My question: how to debug internal (SPA) router logic?

My apache config is:


#3

Thank you, Boris!
It is!
Apache syntax for this:
   RewriteEngine on
   RewriteRule ^/([a-zA-Z0-9]+)$ /index.html

С уважением,
Игорь Акулов
mailto:akulovigor@gmail.com
mailto:egor@akulovs.com
skype:igorakulov
phone: +7 922 02 12 649
phone: +7 925 120 12 04

···

2016-01-21 18:36 GMT+05:00 Boris Grozev <boris@jitsi.org>:

On 21/01/16 06:48, Igor Akulov wrote:

When i use "default" configuration, such as jitsi.mydomain.com
<http://jitsi.mydomain.com>, internal URL redirect to random page, such
as https://meet.jit.si/PoorKidsShootEasily (based on history api) is
always worked.

But, when i change domain to "bazaar.mydomain.com
<http://bazaar.mydomain.com>" (for example), internal url routing does
not worked, and i have "404" page answer from my apache server.

My question: how to debug internal (SPA) router logic?

My apache config is:

[snip]

You seem to be missing the part which does the redirection:

location ~ ^/([a-zA-Z0-9=\?]+)$ {
    rewrite ^/(.*)$ / break;
}

Regards,
Boris

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev