Where to place html and js file?

12 views
Skip to first unread message

stella

unread,
Aug 17, 2011, 8:01:58 AM8/17/11
to Punjab, powda...@gmail.com, ja...@jabber.org
Just two beginner's question.

I have punjab installed, and want to use it to connect to a remote
xmpp server, such as gtalk or FB chat. My questions are:

1. where shall I place the html and js file? In /var/www/ folder or in
the punjabuntarred folder/html/?

2. If I put the html and js code in the untarrred punjab folder, which
url shall I use to load the app? http://mydomin:5280/mytest.html?

3. If I put them in /var/www, do I need to config anything for the
apache server to hook up with punjab?

Your kind help would be really really appreciated!!

/Stella

Jack Moffitt

unread,
Sep 8, 2011, 6:50:11 PM9/8/11
to punja...@googlegroups.com, powda...@gmail.com, ja...@jabber.org
> 1. where shall I place the html and js file? In /var/www/ folder or in
> the punjabuntarred folder/html/?

Anywhere you want normally, though you will need to solve the cross
domain issue for the XMLHttpRequests (usually via proxy or CORS).

If you want punjab to host it, that is certainly possible, and I think
the tac file has an exmaple of it.

> 3. If I put them in /var/www, do I need to config anything for the
> apache server to hook up with punjab?

Yes, you'll want to set up a reverse proxy, which is supported by mod_proxy.

jack.

Xing Fan

unread,
Sep 9, 2011, 3:15:27 AM9/9/11
to punja...@googlegroups.com
Hi Jack,

    Thanks for your reply! I have solved the cross-domain issue via proxy.

     I have a question about how to hide the facebook app secret key when using strophe to connect to facebook server.

    In the original Strophe.Connection.prototype.facebookConnect =
function (jid, callback, wait, hold, apiKey, secretKey, sessionKey)
fuction, secretKey is a requred iput parameter.

   I see in the facebook.html example (distributed together with
strophe), there is a modified
Strophe.Connection.prototype._sasl_challenge_fb fuction, which makes
it possible to hide the app secret key.

   However, it did not work for me.

   Could you kindly explain the idea of how to hide the app secret
key?

/Stella



--
You received this message because you are subscribed to the Google Groups "Punjab" group.
To post to this group, send email to punja...@googlegroups.com.
To unsubscribe from this group, send email to punjab-xmpp...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/punjab-xmpp?hl=en.


Jack Moffitt

unread,
Sep 9, 2011, 10:02:56 AM9/9/11
to punja...@googlegroups.com
>    I see in the facebook.html example (distributed together with
> strophe), there is a modified
> Strophe.Connection.prototype._sasl_challenge_fb fuction, which makes
> it possible to hide the app secret key.
>
>    However, it did not work for me.
>
>    Could you kindly explain the idea of how to hide the app secret
> key?

I did not do the facebook work, so hopefully someone on the list more
familiar with that can help.

jack.

Reply all
Reply to author
Forward
0 new messages