Setting up SSL for Nextcloud on Lighttpd [Resolved]

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
NutsAboutPI
Posts: 3
Joined: Mon Apr 09, 2018 8:00 pm

Setting up SSL for Nextcloud on Lighttpd [Resolved]

Post by NutsAboutPI »

Hi Guys,

I have just found DietPI and love it, so thank you for building a great product so far.

I have DP set up and running Nextcloud:
SSH Server : Dropbear
File Server : None
Log System : DietPi-Ramlog #1
Webserver Preference : Lighttpd <--------

Could somebody talk me through setting up SSL for it please. I am currently using a no-IP free account to direct webtraffic to the Raspi (disabled at router and only using local till i can impliment SSL).
I have read other comments on here in the forum regarding SSL and Nextcloud ,but they are not using "Lightpd" as the webserver.

Is there a way to do this? Please help and thank you for your time in advance.

p.s yes i have seen this but its not working i guess i need to make a key and stick the location for it somewhere. http://dietpi.com/phpbb/viewtopic.php?f=15&t=1638
Last edited by NutsAboutPI on Mon Apr 30, 2018 1:11 pm, edited 1 time in total.
User avatar
WarHawk
Posts: 622
Joined: Thu Jul 20, 2017 8:55 am

Re: Setting up SSL for Nextcloud on Lighttpd [Unresolved]

Post by WarHawk »

lighttpd doesn't support .htaccess files like Apache httpd does. That's where the "light" in "lighttpd" comes into play.

https://stackoverflow.com/questions/365 ... n-lighttpd

Guess you need apache2 as preferred...might need to uninstall nextcloud before switching over to apache2...make sure you do a backup first! ;)
bassopt
Posts: 13
Joined: Sat Mar 03, 2018 11:25 am

Re: Setting up SSL for Nextcloud on Lighttpd [Unresolved]

Post by bassopt »

Hi.

Try the following instructions
https://github.com/galeone/letsencrypt-lighttpd
I used it once on a raspi zero and worked fine.

Regarding using Apache ...on single board computers i usually prefer nginx over Apache. From my experience things can get a bit a out of control with Apache , specially if you use Nextcloud to sync with computers . Stuff like 100% cpu usage all the time resulting in heat issues. Never had a single problem with nginx
NutsAboutPI
Posts: 3
Joined: Mon Apr 09, 2018 8:00 pm

Re: Setting up SSL for Nextcloud on Lighttpd [Unresolved]

Post by NutsAboutPI »

Thank you guys I will look into these two.
User avatar
MichaIng
Site Admin
Posts: 2334
Joined: Sat Nov 18, 2017 6:21 pm

Re: Setting up SSL for Nextcloud on Lighttpd [Unresolved]

Post by MichaIng »

Hi NutsAboutPI,

there is not too much you need to hack around. The LetsEnrcrypt/CertBot implementation of DietPi fully supports Lighttpd since some versions.
Just install CertBot via "dietpi-software", then start "dietpi-letsencrypt", select HTTPS redirection and/or HSTS (would recommend both directly, if you open personal data via Nextcloud to the web), enter your domain and info and go.
Automatic certificate renewal etc. is included.

That .htaccess is not supported by Lighttpd has not much to do with "Light", but with the fact that the use of .htaccess is a ~unique feature of Apache's mpm-prefork + mod-php implementation. No other webserver supports this, as far as I know, they instead can use .user.ini as alternative possibility for folder specific PHP settings. Nextcloud also ships a .user.ini besides its .htaccess file to natively support different webserver or Apache with disabled .htaccess support.

Lighttpd uses the dedicated php-fpm (FastCGI) server as PHP connector, the same with Nginx and this is the way it would be also recommended for large scale Apache2 servers (high traffic, unlike what you are able to handle via SBC), using it's mpm-worker or mpm-event module to access dedicated php-fpm.
Post Reply