Jump to content

Organizr v1.0 Released


causefx

Recommended Posts

Spaceboy

the other sites are using a reverse proxy so theres no html or php files in the caddy directory.

 

Organizr is running as a website so you have to point caddy to where the html files are stores. If the above didnt work and your only planning on running 1 website from caddy then you could move the Organizr files from \caddy\www\organizr  to  caddy\www  and then put the change i suggested above back to normal and test again. 

 

 

For example the way i do it with NGINX is sort of the same. 

 

so for me i have 3 websites running

 

location /

root www\Organizr

 

location /

root www\blog

 

location /

root www\Homepage

 

then i have all my other services reverse proxied like you have

 

gotcha, I understood about sonar/radar etc but I now I see you have to do this for all sub-levels, your blog and your homepage. well you never know, I may need another website in future so lets try and do this properly! :)

 

but your post raises another question. There were no html files in the organizr master file that I downloaded, should there have been? when I extract the zip file there are no html files in the root of the organizr folder

Edited by Spaceboy
Link to comment
Share on other sites

CBers

but your post raises another question. There were no html files in the organizr master file that I downloaded, should there have been? when I extract the zip file there are no html files in the root of the organizr folder

Correct, as you open index.php to start Organizr.

Link to comment
Share on other sites

Spaceboy

Correct, as you open index.php to start Organizr.

 

ah ok, that's my trouble shooting exhausted then...

 

but ultimately i'm still getting a 404 error when trying to access domain/organizr . I can open an index.html in www if I revert the changes I made following synol's guidance so everything seems to be working apart from organizr. although my external user is having trouble connecting from a firetv through the new reverse proxy so perhaps its not all working

Link to comment
Share on other sites

Swynol

ok, i will try installing caddy today and see what i can work out. not very familiar with the config file.

Link to comment
Share on other sites

Swynol

installed caddy but managed to hit the acme challenge limit as it was erroring on getting a cert. have to wait an hour before i can request again.

 

forgot to forward my root domain name i.e. domain.com to my ddns.

  • Like 1
Link to comment
Share on other sites

Spaceboy

installed caddy but managed to hit the acme challenge limit as it was erroring on getting a cert. have to wait an hour before i can request again.

 

forgot to forward my root domain name i.e. domain.com to my ddns.

thank you very much for taking a look at this! although you did say you were interested in checking out caddy so maybe in a round about way i'm helping you out! :lol:

  • Like 1
Link to comment
Share on other sites

Swynol

ye your right i did want to test, was just being lazy. I'm getting somewhere now.

 

Caddy is up and running. i have a index.html file in caddy\www   if i go to mydomain.com  i get my html file.

 

I put Organizr files in caddy\www\organizr and used the config

 

https://mydomain.com/organizr {
ext .html .htm .php
root /caddy/www/organizr
fastcgi / localhost:9000 php
  gzip
  }

it sort of works. I now dont get a 404, Organizr loads but it fails to load some files it needs.

 

5965f12739456_Untitled.jpg

 

 

 

so my full config looks like

mydomain.com {  
startup /caddy/php/php-cgi -b 127.0.0.1:9000 &

 ext .html .htm .php
 root /caddy/www
  
gzip
  
proxy /emby 127.0.0.1:8096 {
 transparent
websockets
  }

}

https://mydomain.com/organizr {
ext .html .htm .php
root /caddy/www/organizr
fastcgi / localhost:9000 php
  gzip
  }
Link to comment
Share on other sites

Swynol

woop woop got it working. i had to put the fastcgi and php start up into the organizr 'block'

    startup /caddy/php/php-cgi -b 127.0.0.1:9000 &
fastcgi / localhost:9000 php

If you had multiple sites that used .php then i'm not sure if you will be able to use the same php port number for each block or if a different port will work. i.e.

https://mydomain.com/organizr {
	ext .html .htm .php
	root /caddy/www/organizr
	startup /caddy/php/php-cgi -b 127.0.0.1:9000 &
     fastcgi / localhost:9000 php
  gzip
  }


https://mydomain.com/anotherphp {
	ext .html .htm .php
	root /caddy/www/organizr
	startup /caddy/php/php-cgi -b 127.0.0.1:9000 &
     fastcgi / localhost:9000 php
  gzip
  }

or like this

https://mydomain.com/organizr {
	ext .html .htm .php
	root /caddy/www/organizr
	startup /caddy/php/php-cgi -b 127.0.0.1:9000 &
     fastcgi / localhost:9000 php
  gzip
  }


https://mydomain.com/anotherphp {
	ext .html .htm .php
	root /caddy/www/organizr
	startup /caddy/php/php-cgi -b 127.0.0.1:9001 &
     fastcgi / localhost:9001 php
  gzip
  }

anyway here is the full config for mine. i havent added any of the extra security yet, but its a start. You will have to change your x-frame security header to SAMEORIGIN for the services to work inside Organizr. Also change  Referrer-Policy "strict-origin" to "no-referrer" unless your using some analytics stuff.

 

mydomain.com {  


  ext .html .htm .php
  root /caddy/www
  
  gzip
  
proxy /emby 127.0.0.1:8096 {
    transparent
websocket
  }
  proxy /sabnzbd localhost:8087 {
 websocket
 transparent
    }
    proxy /sonarr localhost:8989 {
 transparent
    }
    proxy /ombi localhost:3579 {
transparent
}
    proxy /radarr localhost:7878 {
 transparent
    }
    proxy /headphones localhost:8181 {
 transparent
 }


}




https://mydomain.com/organizr {
ext .html .htm .php
root /caddy/www/organizr
startup /caddy/php/php-cgi -b 127.0.0.1:9000 &
     fastcgi / localhost:9000 php
  gzip
  }

 

 

EDIT: sorry changed a few formatting and added stuff

Edited by Swynol
  • Like 2
Link to comment
Share on other sites

Swynol

just looking at different configs for Caddy, it looks very interesting. If you have your own certs you can use the following to load them. They need to be in .pem and .key format

tls {
    load /www/certificates
}

also anyone looking as to where the certs are stored when caddy automatically generates them, on windows its C:\Users\%username%\.caddy\acme\....

Edited by Swynol
Link to comment
Share on other sites

Spaceboy

woop woop got it working. i had to put the fastcgi and php start up into the organizr 'block'

    startup /caddy/php/php-cgi -b 127.0.0.1:9000 &
fastcgi / localhost:9000 php

If you had multiple sites that used .php then i'm not sure if you will be able to use the same php port number for each block or if a different port will work. i.e.

https://mydomain.com/organizr {
	ext .html .htm .php
	root /caddy/www/organizr
	startup /caddy/php/php-cgi -b 127.0.0.1:9000 &
     fastcgi / localhost:9000 php
  gzip
  }


https://mydomain.com/anotherphp {
	ext .html .htm .php
	root /caddy/www/organizr
	startup /caddy/php/php-cgi -b 127.0.0.1:9000 &
     fastcgi / localhost:9000 php
  gzip
  }

or like this

https://mydomain.com/organizr {
	ext .html .htm .php
	root /caddy/www/organizr
	startup /caddy/php/php-cgi -b 127.0.0.1:9000 &
     fastcgi / localhost:9000 php
  gzip
  }


https://mydomain.com/anotherphp {
	ext .html .htm .php
	root /caddy/www/organizr
	startup /caddy/php/php-cgi -b 127.0.0.1:9001 &
     fastcgi / localhost:9001 php
  gzip
  }

anyway here is the full config for mine. i havent added any of the extra security yet, but its a start. You will have to change your x-frame security header to SAMEORIGIN for the services to work inside Organizr. Also change  Referrer-Policy "strict-origin" to "no-referrer" unless your using some analytics stuff.

 

mydomain.com {  


  ext .html .htm .php
  root /caddy/www
  
  gzip
  
proxy /emby 127.0.0.1:8096 {
    transparent
websocket
  }
  proxy /sabnzbd localhost:8087 {
 websocket
 transparent
    }
    proxy /sonarr localhost:8989 {
 transparent
    }
    proxy /ombi localhost:3579 {
transparent
}
    proxy /radarr localhost:7878 {
 transparent
    }
    proxy /headphones localhost:8181 {
 transparent
 }


}




https://mydomain.com/organizr {
ext .html .htm .php
root /caddy/www/organizr
startup /caddy/php/php-cgi -b 127.0.0.1:9000 &
     fastcgi / localhost:9000 php
  gzip
  }

 

 

EDIT: sorry changed a few formatting and added stuff

ok i tried this just replacing mydomain with my actual domain but caddy doesnt start with this as my conf file. i get a parse error: unknown directive. i've tried looking at the text to see if i can spot the error but i can't

Link to comment
Share on other sites

Swynol

what did you name the caddy file? mine is just called caddyfile placed in the same place as caddy.exe

 

also do you have the php files installed? you should have a folder in caddy called php. and then edit the php.ini file, search for 

;extension=php_pdo_sqlite.dll
;extension=php_sqlite3.dll
;extension=php_openssl.dll
;extension=php_curl.dll

and then remove the ; from the front of them

 

 

i think I've seen that error before when PHP wasnt configured or in the correct location

 

EDIT:

 

are you running caddy by just clicking on the .exe? if so also make sure you right click and run as administrator.  had some issue with ports not binding when not running as admin

Edited by Swynol
Link to comment
Share on other sites

Spaceboy

what did you name the caddy file? mine is just called caddyfile placed in the same place as caddy.exe

 

also do you have the php files installed? you should have a folder in caddy called php. and then edit the php.ini file, search for 

;extension=php_pdo_sqlite.dll
;extension=php_sqlite3.dll
;extension=php_openssl.dll
;extension=php_curl.dll

and then remove the ; from the front of them

 

 

i think I've seen that error before when PHP wasnt configured or in the correct location

 

EDIT:

 

are you running caddy by just clicking on the .exe? if so also make sure you right click and run as administrator.  had some issue with ports not binding when not running as admin

i've tried just caddyfile and a .caddyfile that i've called with the correct arguments. caddy starts both ways and i can see the contents of index.html in www.

 

php is in a subfolder called php. i renamed php dev.ini to php.ini and uncommented those lines. i also had to uncomment the line that tells php where the ext folder is as i initially installed php in c:\ and it was still looking for the extensions in c:\php\ext. i was getting errors when launching php for this but after inserting this line they went away.

 

i've tried starting caddy using a service via nssm and via the command prompt with and without administrator privileges. 

 

i followed the caddy / organizr guide i referenced to the letter and it all works with the exception of organizr. the only thing i have changed is the caddyfile you've included above. i still can't see why i can't get caddy to start using your caddyfile.

 

any further help gratefully received! :)

Link to comment
Share on other sites

Spaceboy

I think there was an issue with copying and pasting into the caddy file. I'm rewriting by hand but just come up against the acme limit!

Link to comment
Share on other sites

Spaceboy

what did you name the caddy file? mine is just called caddyfile placed in the same place as caddy.exe

 

also do you have the php files installed? you should have a folder in caddy called php. and then edit the php.ini file, search for 

;extension=php_pdo_sqlite.dll
;extension=php_sqlite3.dll
;extension=php_openssl.dll
;extension=php_curl.dll

and then remove the ; from the front of them

 

 

i think I've seen that error before when PHP wasnt configured or in the correct location

 

EDIT:

 

are you running caddy by just clicking on the .exe? if so also make sure you right click and run as administrator.  had some issue with ports not binding when not running as admin

 

 

ok, i got caddy to run with your caddyfile and it runs but organizr still isnt working so back to square one. i can see caddy and cgi /fastcgi processes in task manager so I think this means both php and caddy are running.

 

what else can I try?

Link to comment
Share on other sites

CBers

Is this stand alone or available in the Emby server plugin catalogue?

Standalone, as is Ombi.

Link to comment
Share on other sites

Swynol

ok, i got caddy to run with your caddyfile and it runs but organizr still isnt working so back to square one. i can see caddy and cgi /fastcgi processes in task manager so I think this means both php and caddy are running.

 

what else can I try?

 

Strange. are you still getting a 404 when trying to go to https://mydomain.com/organizr? if you can take a screen shot of your caddy folder and inside the www folder and post here. Also strange that you hit the acme limit, as once you have your cert it saves them and is valid for 90 days. you would only usually hit the limit if its trying to get a new cert again. the limit is 5 in 1 hour.

 

another option is i zip my caddy folder up and send it to you to extract and see if that works.

 

 

 

Is this stand alone or available in the Emby server plugin catalogue?

 

standalone.

Link to comment
Share on other sites

Spaceboy

Strange. are you still getting a 404 when trying to go to https://mydomain.com/organizr? if you can take a screen shot of your caddy folder and inside the www folder and post here. Also strange that you hit the acme limit, as once you have your cert it saves them and is valid for 90 days. you would only usually hit the limit if its trying to get a new cert again. the limit is 5 in 1 hour.

yep, still getting the 404, every other service is working. the acme error was due to my mistyping of the url for organizr...

 

caddy folder

 

59689e07c0043_caddy.png

 

www folder

 

59689e2d66243_www.png

 

and here is my caddyfile for good measure.

 

 

my domain.org {
 ext .html .htm .php

 root /caddy/www

 gzip
proxy /radarr localhost:7878 {

 transparent

}

proxy /sonarr localhost:8989 {

 transparent

}

proxy /emby localhost:8096 {

 transparent

 websocket

}

proxy /ombi localhost:3579 {

 transparent

}

proxy /headphones localhost:8181 {

 transparent

}

proxy /sabnzbd localhost:8087 {

 transparent

 websocket

}

}
https://mydomain.org/organizr {

ext .html .htm .php

root /caddy/www/organizr

startup /caddy/php/php-cgi -b 127.0.0.1:9000 &

 fastcgi /localhost:9000 php

 gzip

}

Edited by Spaceboy
Link to comment
Share on other sites

Swynol

everything is almost exactly like mine except in your caddy file you have

fastcgi /localhost:9000 php

in mine i have

fastcgi / localhost:9000 php

notice the space after /

  • Like 1
Link to comment
Share on other sites

Spaceboy

hurrah, something seems to be working! let me try organizr for a bit. I still have other questions on caddy set up though!

Link to comment
Share on other sites

Swynol

awesome. guessing it was something to do with that slash. It should ask you where to put the database file. the default is fine but i tend to prefer to put it in the organizr folder to keep everything tidy.

 

Next we can look at the security settings.

Link to comment
Share on other sites

Spaceboy

ok, my final issues:

 

even if i'm not signed in to organizr, if i go to domain/organizr/index.php then i can see the organizr buttons at the top of the screen but i can also see all the tabs down the left of the screen and each of them can be opened bringing me to that service's login screen. i kind of expected all of this to be hidden until ive logged into organizr.

 

i guess similarly, even if i've logged out of organizr, but i didnt log out of one of the services, say sonarr, then i can still go to the sonarr tab and keep using sonarr. i know i'm still logged into sonarr but again as i'm accessing it through organizr then i expected it to be hidden behind a login screen. This second issue isnt really that important but the first is advertising your services externally which doesnt seem like a great idea to me? perhaps there is a simple setting that changes this but i couldnt see anything. there does seem to be a help function in the screenshots but i cant see this.

 

just trying to log on to organizr now i'm getting 502 bad gateway. there was a fix for that on the installation page so i'll try that

 

previously when i could access organizr and went to domain/organizr i got a sort of broken login screen, accessing via domain/organizr/index/php is fine.

 

and i couldnt get everything in the homepage to work, emby, sab and the speed test were fine but the dropdown for music, movies and tv which i guess are headphones, radarr and sonarr respectively didnt seem to do anything.

 

lets take the caddy chat back here https://emby.media/community/index.php?/topic/48718-how-to-renew-ssl-certs-on-windows/&do=findComment&comment=467229 rather than cluttering up organizr's thread and there are some other interested readers there too

Link to comment
Share on other sites

CBers

ok, my final issues:

 

even if i'm not signed in to organizr, if i go to domain/organizr/index.php then i can see the organizr buttons at the top of the screen but i can also see all the tabs down the left of the screen and each of them can be opened bringing me to that service's login screen. i kind of expected all of this to be hidden until ive logged into organizr.

 

 

How are your tabs setup? Are they USER access, or USER and GUEST?

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...