wkallhof / Hazel

Fast, simple, markdown powered wiki knowledge base for Node.js
http://hazel.wmk.io
GNU General Public License v3.0
118 stars 28 forks source link

Running behind Apache proxy, `base` directive doesn't seem to have any effect #3

Closed gruentee closed 7 years ago

gruentee commented 8 years ago

Hello there, first of all – thanks for your effort, Hazel looks great as far as I can judge from what I've seen so far.

However, trying to set up my personal instance on a shared hosting I encountered the following error. I'm attempting to run Hazel behind an Apache and in a sub-directory:

http://domain.com/wiki

Therefore I set base in my config.default.js:

var config = {
  //  Your site title (format: page_title - site_title)
  site_title: "Abacus Wiki",

  //Application base url
  base: "/wiki/",
};
// Exports
module.exports = config;

My .htaccess in the specified dir /wiki contains a rewrite

RewriteEngine On
RewriteRule (.*) http://localhost:62626/$1 [P]

directing any request to the running Hazel server.

Still the paths in the resulting HTML pages are incorrect (e.g. /styles/tidy.css) resulting in un-styled pages.

What is wrong here?

wkallhof commented 8 years ago

@gruentee with the latest version I pushed out today (1.1.3), there are corrections for how assets are referenced. Please try the latest version and let me know if you continue to run into issues.

gruentee commented 8 years ago

Thanks Wade, works perfectly now.