Bitcoin Forum
March 30, 2017, 08:37:51 PM *
News: Latest stable version of Bitcoin Core: 0.14.0  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Apache HTTPD Configuration for Bitcoin JS Remote  (Read 1778 times)
jpsoto
Newbie
*
Offline Offline

Activity: 10


View Profile
March 27, 2011, 09:08:04 PM
 #1

Dear friends,
I have just added a short wiki fragment with the proper configuration to access remotely Bitcoin daemon using a browser.

Thanks for a great piece of code: Bitcoin JS Remote.

Please, test and feedback:
https://en.bitcoin.it/wiki/Bitcoin-js-remote

1490906271
Hero Member
*
Offline Offline

Posts: 1490906271

View Profile Personal Message (Offline)

Ignore
1490906271
Reply with quote  #2

1490906271
Report to moderator
The Bitcoin network protocol was designed to be extremely flexible. It can be used to create timed transactions, escrow transactions, multi-signature transactions, etc. The current features of the client only hint at what will be possible in the future.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1490906271
Hero Member
*
Offline Offline

Posts: 1490906271

View Profile Personal Message (Offline)

Ignore
1490906271
Reply with quote  #2

1490906271
Report to moderator
1490906271
Hero Member
*
Offline Offline

Posts: 1490906271

View Profile Personal Message (Offline)

Ignore
1490906271
Reply with quote  #2

1490906271
Report to moderator
tcatm
Sr. Member
****
Offline Offline

Activity: 337


View Profile
March 28, 2011, 08:58:56 PM
 #2

Great work! I'll add a link to the wiki on the project page.
bitcoinex
Sr. Member
****
Offline Offline

Activity: 350


probiwon.com


View Profile WWW
March 29, 2011, 07:52:58 AM
 #3

Yes, it is useful to understand how daemon can be used

New bitcoin lottery: probiwon.com
- Может, ты ещё и в Невидимую Руку Рынка веруешь? - Зачем же веровать в то, что можно наблюдать непосредственно?
jpsoto
Newbie
*
Offline Offline

Activity: 10


View Profile
March 31, 2011, 03:36:04 AM
 #4

@tcatm
thanks for adding my contribution.

I would like to propose you a tiny convenience improvement for BC JS Remote.

I am setting up BC JS Remote to access several instances of bitcoind running in the same box; more specifically a testnet-in-a-box configuration:
http://sourceforge.net/projects/bitcoin/files/Bitcoin/testnet-in-a-box/

Using a fixed value for RPC.url in the settings.json file is a difficulty for multiple access, because there is no way to instruct Apache to proxy to/from every bitcoind instance.

My proposal is following behaviour; if the RPC.url field is undefined, it is automatically assigned to a value derived from the directory part of the URI. For instance,

Accessing with http://mydomain/jbc1 leads to a RPC.url value of "/jbc1/bitcoind/, and
accessing with http://mydomain/jbc2 leads to a RPC.url value of "/jbc2/bitcoind/

This allows us to setup different Proxy directives for the Apache webserver. For instance:
ProxyPass /jbc1/bitcoind/ http://localhost:19331/
ProxyPass /jbc2/bitcoind/ http://localhost:19332/

Is an interesting improvement for you?, could you code such a suggestion?

Also, I could pull a patch for BC JS Remote, my experience coding JS is limited but acceptable.
tcatm
Sr. Member
****
Offline Offline

Activity: 337


View Profile
March 31, 2011, 03:53:37 AM
 #5

I think that's already possible. Try setting RPC.url to "bitcoind/" and it should append that to the path.
jpsoto
Newbie
*
Offline Offline

Activity: 10


View Profile
April 01, 2011, 07:02:47 AM
 #6

@tcatm, you are right

Setting up RPC.url="bitcoind/" allows to configure Apache for multiple access. For instance, following Apache configuration

   AliasMatch   ^/jbc([0-9]?)(.*)$ your_prefer_pathabs_to_JSRemote_without_trailing_slash$2
   ProxyPass    /jbc/bitcoind/ http://localhost:8332/
   ProxyPass    /jbc1/bitcoind/ http://localhost:19331/
   ProxyPass    /jbc2/bitcoind/ http://localhost:19332/

allows following concurrent accesses:

   http://mydomain/jbc   .......... Access to a bitcoind listening the default rpc port (8332)
   http://mydomain/jbc1 .......... Access to another bitcoind listening a non-default rpc port (19331)
   http://mydomain/jbc2 .......... Access to another bitcoind listening a non-default rpc port (19332)

Another tip. Taking in account bitcoind talks only json (To-Be-Confirmed), ProxyPassReverse is not required.
tcatm
Sr. Member
****
Offline Offline

Activity: 337


View Profile
April 01, 2011, 07:24:44 AM
 #7

ProxyPass should be enough. RPC is only JSON.
jpsoto
Newbie
*
Offline Offline

Activity: 10


View Profile
April 02, 2011, 09:42:55 AM
 #8

Dear friends, ... Bitcoin JS Remote wiki has been updated to clarify several Apache configurations tips.

Please, test and feedback:
https://en.bitcoin.it/wiki/Bitcoin-js-remote
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!