Re: Simple and secure blogging software for nginx

2022-03-11 Thread songbird
Christian Britz wrote:
...
> Running and writing the blog. At the moment I tend to a static
> generator, which would probably also make archival easier?!

  that is what hugo is.  many themes to choose from or do your
own.


  songbird



Re: Simple and secure blogging software for nginx

2022-03-11 Thread Greg Wooledge
On Fri, Mar 11, 2022 at 12:48:28PM -0400, Chris Mitchell wrote:
> I believe Apache and nginx both have fairly robust support for popular
> server-side languages like PHP, so many toolkits will work happily on
> top of either one.

nginx can be told to contact php-fpm in order to run PHP scripts.
Here's a basic outline of what you want:

1) Install nginx.  Set up your virtual hosts ("sites"), so that each
   one is working, at least to the point of delivering an index.html
   page out of the correct site's directory.

2) Install php-fpm.

3) In the virtual host that wants to allow PHP scripts, add a stanza like
   this one:

location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
include fastcgi_params;
}

   The exact path of the unix domain socket will depend on which version
   of Debian (and therefore php-fpm) you're using.

4) Reload nginx, and test it.

This is quite different from the Apache philosophy of "oh, we will
provide a special apache-php module, and you need to configure Apache
to use this module".  nginx uses a more strict separation.  The web
server runs as one user, and the php-fpm daemon runs as a different
user, and they communicate over a unix domain socket.

That will matter if your PHP scripts need to write to files.  You'll
need to make sure the files have appropriate ownership/permissions for
php-fpm to write to them, and *possibly* for nginx to read them, if
they're intended to be served directly.  (If they're not intended to
be served, then don't store them under the document_root, and nginx
won't be able to find them.)



Re: Simple and secure blogging software for nginx

2022-03-11 Thread Christian Britz
Thank you for your thoughts, Russel,

On 2022-03-11 18:40 UTC+0100, Russell L. Harris wrote:
> Christian is talking about three different projects, each of which is
> demanding of time.
> 
> Securing and maintaining a web server is a difficult matter.  But when
> you can purchase hosting for US$4 per month, is it worth your while?

Absolutely true. I do it on my own for fun and learning. If I only
wanted the diary, I would contract a hoster.

> Maintaining a blogging engine is a wholly different matter.  And most people 
> are
> looking for an engine which is requires little or no maintenance
> (Blosxom, for example) and is simple and natural to use.  WordPress

I will look into this.

> began as a blogging engine, but quickly morphed into an all-consuming
> religion.  

:-)

> Writing a public diary about moving to a new town is yet another
> matter, and should not be constrained by either the blogging engine
> or the web server.  That task can easily consume all of your time.  

I don't hope so! I want to enjoy the new town! :-) (Actually I will live
there for only half a year, at least that is the plan). The diary is for
me, my friends and my family.

> You need to decide on your primary goal and focus upon that.

Running and writing the blog. At the moment I tend to a static
generator, which would probably also make archival easier?!

Regards,
Christian

-- 
http://www.cb-fraggle.de



Re: Simple and secure blogging software for nginx

2022-03-11 Thread Russell L. Harris

On Fri, Mar 11, 2022 at 08:19:02AM -0500, songbird wrote:

Christian Britz wrote:
...

Thank you, I allow my self to reply on the list.
I heard that WordPress is very common, but I fear it might be oversized
for my public diary about moving to a new town, which I plan to write.
And it is very often in the news with security holes... Don't want some
bad person to manipulate my cute tiny Raspi, now that it has finally
moved to pure Debian. ;-)

I want the solution to be in the repository to benefit from
unattended-upgrades.



 i use hugo for my website.  but hugo is not nginx.


Christian is talking about three different projects, each of which is
demanding of time.

Securing and maintaining a web server is a difficult matter.  But when
you can purchase hosting for US$4 per month, is it worth your while?

Maintaining a blogging engine is a wholly different matter.  And most people are
looking for an engine which is requires little or no maintenance
(Blosxom, for example) and is simple and natural to use.  WordPress
began as a blogging engine, but quickly morphed into an all-consuming
religion.  


Writing a public diary about moving to a new town is yet another
matter, and should not be constrained by either the blogging engine
or the web server.  That task can easily consume all of your time.  


You need to decide on your primary goal and focus upon that.

RLH



Re: Simple and secure blogging software for nginx

2022-03-11 Thread Chris Mitchell
On Thu, 10 Mar 2022 22:39:34 +0100
Christian Britz  wrote:

> Sure, I think I was not precise in my posting. I am willing to add
> something dynamic, and I was not sure if Apache and nginx support the
> same toolkits.
> 
> You and others brought in several static content generators, I will
> consider that option too.

I believe Apache and nginx both have fairly robust support for popular
server-side languages like PHP, so many toolkits will work happily on
top of either one.

That said, you did mention "as secure as possible" in your initial
request, and obviously no other option comes anywhere near static html
pages in terms of security.

Count me as another voice in favour of a static site generator. In
particular, I've been playing around with Hugo, which won me over
largely by virtue of using Markdown as its input format. With all
respect to LaTeX (sorry Russell!), it's a staggeringly complex
language with a steep learning curve. If you want a markup language
that supports every typographical feature ever invented, you can't beat
LaTeX. For basic web content with links, emphasis, and the occasional
bulleted list, Markdown is enough tool for the job, and has the
advantages of simplicity and vastly greater human-readability. I don't
know about you, but I don't need a 747 to get to the corner store.

Site generators like Hugo automatically generate nav menus, TOCs, and
similar, so you get a lot of the convenience features of a blogging
platform... just without the platform. If you use git, you can make a
relatively uncomplicated, entirely self-hosted deploy pipeline that
updates the site automatically whenever you make a commit to the
website's git repo, as shown here:

https://www.digitalocean.com/community/tutorials/how-to-deploy-a-hugo-site-to-production-with-git-hooks-on-ubuntu-14-04

And since the content is all plain Markdown files stored in a sensible
directory structure on disk, it's very portable in case you want to
move to some other platform later.

There is definitely a bit of a learning curve with Hugo, though if you
start with a pre-built "theme", it's not overly hard to get a site up
and running now and delve into all the customizable details later.

Cheers!
 -Chris



Re: Simple and secure blogging software for nginx

2022-03-11 Thread songbird
Christian Britz wrote:
...
> Thank you, I allow my self to reply on the list.
> I heard that WordPress is very common, but I fear it might be oversized
> for my public diary about moving to a new town, which I plan to write.
> And it is very often in the news with security holes... Don't want some
> bad person to manipulate my cute tiny Raspi, now that it has finally
> moved to pure Debian. ;-)
>
> I want the solution to be in the repository to benefit from
> unattended-upgrades.


  i use hugo for my website.  but hugo is not nginx.


  songbird



Re: Simple and secure blogging software for nginx

2022-03-11 Thread Jörg-Volker Peetz

Take a look at https://dotclear.org/ which is PHP based.
Some time ago Debian also had it packaged.

Regards,
Jörg.



Re: Simple and secure blogging software for nginx

2022-03-11 Thread Christian Britz



On 2022-03-11 06:06 UTC+0100, Russell L. Harris wrote:

> Life is too short to mess around with a markup language other than
> LaTeX.  Work always in LaTeX.
Next topic on my learning agenda. :-)

-- 
http://www.cb-fraggle.de



Re: Simple and secure blogging software for nginx

2022-03-10 Thread Russell L. Harris

I am a long-time user of Debian, Emacs, and LaTeX.  I began blogging
with version 1.0 of WordPress, but soon I grew weary of the constant
need to upgrade.  Over the years I have tried many (if not most) of
the blogging engines, hoping to find a static engine which could read
LaTeX markup.  I even tried Blosxom; it was better than many.

But not until this year "habe ich Nirvana erreichtet."  (Forgive my
poor deutsch; I am attempting to quote Hermann Hesse, Siddhartha.")
The key is that I am using "make4ht" to invoke "text4ht".

This allows me to compose in LaTeX and provides me with a set of .html
files (and even a .css file) which I upload to a hosting service.  One
hosting service I use runs Apache; the other runs Nginx.  Both work.

In LaTeX, I use "report.cls" for the blog; each blog posting is a
chapter.  The postings are listed in a table of contents.  Adding a
new post involves a run of my script "make.blog":

make4ht -c config.cfg -d blog-url blog-url.tex

Life is too short to mess around with a markup language other than
LaTeX.  Work always in LaTeX.

RLH

--
How should one chase a thousand, and two put ten thousand to flight,
except their Rock had sold them, and the Lord had shut them up?
- Deuteronomy 32:30



Re: Simple and secure blogging software for nginx

2022-03-10 Thread paulf
On Thu, 10 Mar 2022 22:14:18 +0100
Christian Britz  wrote:

> 
> 
> On 2022-03-10 22:09 UTC+0100, Kevin Exton wrote:
> > You need a blogging CMS like WordPress, or alternatively some kind
> > of static site generator like GatsbyJS. Not sure what is or isn't
> > in the Debian repositories though... 
> 
> Thank you, I allow my self to reply on the list.
> I heard that WordPress is very common, but I fear it might be
> oversized for my public diary about moving to a new town, which I
> plan to write. And it is very often in the news with security
> holes... Don't want some bad person to manipulate my cute tiny Raspi,
> now that it has finally moved to pure Debian. ;-)
> 
> I want the solution to be in the repository to benefit from
> unattended-upgrades.
> 

I've worked with WordPress. It is a beast. You are correct, it is
vastly overkill for your purposes. I haven't looked
at static site generators, except for Hugo. Hugo claims to be easy to
use, but there is a steeper learning curve than you'd expect.

Paul

-- 
Paul M. Foster
http://noferblatz.com
http://quillandmouse.com



Re: Simple and secure blogging software for nginx

2022-03-10 Thread paulf
On Thu, 10 Mar 2022 22:06:34 +0100
Christian Britz  wrote:

> Dear community,
> 
> I am looking for recommendations for setting up a blog with nginx web
> server. What I have so far: nginx-light with static pages.
> 
> What would I need to be able to host a blog? I search something as
> simple and secure as possible, there will be very low traffic. It
> should be available directly from the Debian stable repository. From
> what I understand, nginx supports php like apache, so the solutions
> are inter-changeable (if I would choose something php-based)?
> 
> Thank you,
> Christian
> 

I wrote PHP blog software for myself, which is server-agnostic. See,
for example, http://noferblatz.com which is my blog. The software is at
https://gitlab.com/paulmfoster/grotblog . Its features are:

1. You write your own entries on your local machine in HTML or markdown.
2. You upload your entries to the website via the admin interface.
3. If you know CSS and/or HTML, you may customize the look of your site
all you like.
4. Your entries are stored as text files, not in a database.
5. Should you say politically incorrect things and have someone shut
your blog down or hack it, you can reconstruct your blog rather easily
somewhere else.
6. You can easily add "static" pages, like your resume.

More detail on the Gitlab page. It's not for everyone, but if you find
it useful, let me know.

Paul

-- 
Paul M. Foster
http://noferblatz.com
http://quillandmouse.com



Re: Simple and secure blogging software for nginx

2022-03-10 Thread Kevin Exton
Static site generators are very nice to use. Gives you a simple text editor
for writing and then you just let the generator link all the pages and add
the pre-defined styling.

Never have to run down broken links again.

They take a little configuring to get it right initially though so you need
a little patience right in the beginning.

- Kevin

On Fri, Mar 11, 2022, 8:39 AM Christian Britz  wrote:

>
>
> On 2022-03-10 22:16 UTC+0100, Dan Ritter wrote:
>
> > nginx is just a web server, apache is just a web server. Nearly
> > any blog can be set up with either one of them, or a number of
> > other servers. Static sites don't need language support in the
> > server at all.
>
> Sure, I think I was not precise in my posting. I am willing to add
> something dynamic, and I was not sure if Apache and nginx support the
> same toolkits.
>
> You and others brought in several static content generators, I will
> consider that option too.
>
> --
> http://www.cb-fraggle.de
>
>


Re: Simple and secure blogging software for nginx

2022-03-10 Thread Christian Britz



On 2022-03-10 22:16 UTC+0100, Dan Ritter wrote:

> nginx is just a web server, apache is just a web server. Nearly
> any blog can be set up with either one of them, or a number of
> other servers. Static sites don't need language support in the
> server at all.

Sure, I think I was not precise in my posting. I am willing to add
something dynamic, and I was not sure if Apache and nginx support the
same toolkits.

You and others brought in several static content generators, I will
consider that option too.

-- 
http://www.cb-fraggle.de



Re: Simple and secure blogging software for nginx

2022-03-10 Thread Christian Britz



On 2022-03-10 22:28 UTC+0100, Greg Wooledge wrote:
> On Thu, Mar 10, 2022 at 10:06:34PM +0100, Christian Britz wrote:
>> I am looking for recommendations for setting up a blog with nginx web
>> server. What I have so far: nginx-light with static pages.
>>
>> What would I need to be able to host a blog?
> 
> A text editor, to create the static pages.

Haha, very funny, I used to create sites that way back in the HTML 3.2
era on my Commodore Amiga, but my hope was to find something more
comfortable which looks neat out of the box.

-- 
http://www.cb-fraggle.de



Re: Simple and secure blogging software for nginx

2022-03-10 Thread Dan Ritter
Christian Britz wrote: 
> Dear community,
> 
> I am looking for recommendations for setting up a blog with nginx web
> server. What I have so far: nginx-light with static pages.
> 
> What would I need to be able to host a blog? I search something as
> simple and secure as possible, there will be very low traffic. It should
> be available directly from the Debian stable repository. From what I
> understand, nginx supports php like apache, so the solutions are
> inter-changeable (if I would choose something php-based)?


nginx is just a web server, apache is just a web server. Nearly
any blog can be set up with either one of them, or a number of
other servers. Static sites don't need language support in the
server at all.

Available in Debian stable:

jekyll
hugo
lektor
mkdocs
nanoc
pelican

I like pelican, myself.

-dsr-



Re: Simple and secure blogging software for nginx

2022-03-10 Thread Greg Wooledge
On Thu, Mar 10, 2022 at 10:06:34PM +0100, Christian Britz wrote:
> I am looking for recommendations for setting up a blog with nginx web
> server. What I have so far: nginx-light with static pages.
> 
> What would I need to be able to host a blog?

A text editor, to create the static pages.



Re: Simple and secure blogging software for nginx

2022-03-10 Thread der.hans

Am 10. Mar, 2022 schwätzte Christian Britz so:

moin moin Christian,

I have been playing with jekyll, a static site generator. I have a few
friends using it.

The main reason I've gone with jekyll is that the AsciiDoc module is in
the package repo. Many static site generators seem to have MarkDown
support built in.

Using AsciiDoc I can put the entire thing into git on my workstations and
laptops and push out updates when something changes.

The site is then static html file, so any web server can front it.

ciao,

der.hans


Dear community,

I am looking for recommendations for setting up a blog with nginx web
server. What I have so far: nginx-light with static pages.

What would I need to be able to host a blog? I search something as
simple and secure as possible, there will be very low traffic. It should
be available directly from the Debian stable repository. From what I
understand, nginx supports php like apache, so the solutions are
inter-changeable (if I would choose something php-based)?

Thank you,
Christian


--
#  https://www.LuftHans.com   https://www.PhxLinux.org
#  Stell dir vor, es ist Krieg und keiner geht hin...

Re: Simple and secure blogging software for nginx

2022-03-10 Thread Christian Britz



On 2022-03-10 22:09 UTC+0100, Kevin Exton wrote:
> You need a blogging CMS like WordPress, or alternatively some kind of
> static site generator like GatsbyJS. Not sure what is or isn't in the
> Debian repositories though... 

Thank you, I allow my self to reply on the list.
I heard that WordPress is very common, but I fear it might be oversized
for my public diary about moving to a new town, which I plan to write.
And it is very often in the news with security holes... Don't want some
bad person to manipulate my cute tiny Raspi, now that it has finally
moved to pure Debian. ;-)

I want the solution to be in the repository to benefit from
unattended-upgrades.