Run Hello-tutorial on Apache

I want to run this Dapp on a directory on an Apache html server.

  1. I created an ‘.htaccess’ file with:
    <Files “manifest.json”>
    Header set Access-Control-Allow-Origin: *
    Header set Access-Control-Allow-Headers: “X-Requested-With, Content-Type, Origin, Authorization, Accept, Client-Security-Token, Accept-Encoding”
    Header set Access-Control-Allow-Methods: “POST, GET, OPTIONS, DELETE, PUT”

    <Files “index.html”>
    Header set Access-Control-Allow-Origin: *
    Header set Access-Control-Allow-Headers: “X-Requested-With, Content-Type, Origin, Authorization, Accept, Client-Security-Token, Accept-Encoding”
    Header set Access-Control-Allow-Methods: “POST, GET, OPTIONS, DELETE, PUT”

  2. on file: \node_modules\blockstack\lib\auth\authApp.js
    I replaced:
    var redirectURI = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window.location.origin + ‘/’;
    var manifestURI = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window.location.origin + ‘/manifest.json’;

with:
var redirectURI = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window.location.href;
var manifestURI = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window.location.href + ‘manifest.json’;
in order to see the local manifest, NOT demand a root one.
and browserified a new newbundle.js file with:
browserify lib/index.js --standalone blockstack -o newbundle.js

THEN
the app authenticates, I see Hello myid
but then REDIRECTS to root index.html of my site, which I do not want.
I appreciate any help!

Hi, @synagonism sorry to hear you are having problems. We have several hello-tutorials which one are you trying to work with? Is it this one?

@moxiegirl, yes this is.
But the problem is not the app.
It is blockstack.js that demands the app to be stored in root not in a subdirectory.

I want to do that (run app is subdir) because I want to create a dapp and run it from a subdir in my site synagonism.net