Jump to content

Raspberry pi4B simple webserver (HTML?)

Exidor

Honestly I am unsure if this is even the correct forum section. If not sorry.

 

So I decided to play around with a Raspberry pi for the first time.

My plan is simple. I want to run two things PiHole and a simple webserver.

 

So i want to ask what is the simple webserver I can run on a PI?

The goal is for the webserver to resolve QR codes on the internal network just the local WiFi.

I have a lot of jars..... with stuff like spices and tea. And it is a pain to keep track of everything in there.

So I wan to solve this by slapping QR or 2D codes on them. Scan a code get directed to a HTML page with a basic grid layout with: 

Name

Date bought         Date expire         (possibly later picture)

Plain text description

 

Button to edit.

Save Discard.

 

So what would be the most light weight simplest to deploy thing on a Pi?

I honestly have never touched arm.

And last time I did code the LAMP stack was still the dominant thing been some 7 years or so.....

Link to comment
Share on other sites

Link to post
Share on other sites

12 hours ago, Exidor said:

My plan is simple. I want to run two things PiHole and a simple webserver.

This will require some tweaking to make your app and PiHole to use the same webserver. Otherwise you wont be able to use port 80 on both, but i don't really know how this works :/

 

13 hours ago, Exidor said:

So i want to ask what is the simple webserver I can run on a PI?

Depends on the model i guess :D nginx, apache whatever you like, most of them should work just fine. PiHole uses Lighttpd.

ಠ_ಠ

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, shadow_ray said:

This will require some tweaking to make your app and PiHole to use the same webserver. Otherwise you wont be able to use port 80 on both, but i don't really know how this works :/

 

Depends on the model i guess :D nginx, apache whatever you like, most of them should work just fine. PiHole uses Lighttpd.

Thanks,

 

I ordered a Raspberry Pi4B

Should be here Friday.

 

Seems that at least apache has not changed much since I last used it 7 years ago :D

Lighttpd ok good to know will need to look into that.

Link to comment
Share on other sites

Link to post
Share on other sites

If you are coding a simple PHP app you could use the builtin webserver to host your script. Rather than whole AMP stack.

https://www.php.net/manual/en/features.commandline.webserver.php

 

You dont need your webserver to use port 80 to host websites. Webserver can run on a different port, you'll need to provide it in your links. ie domain.com:<port number>/path/to/page

Link to comment
Share on other sites

Link to post
Share on other sites

wheni want to serve a folder i just use docker

 

docker run --rm -it -p 80:80 -p 443:443 -v "${PWD}:/srv/data" rflathers/nginxserve

 

I actually have this as alias in my .zshrc

 

alias nginxhere='docker run --rm -it -p 80:80 -p 443:443 -v "${PWD}:/srv/data" rflathers/nginxserve'

 

 

we get https though the browser wont trust the cert

                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, James Evens said:

On a pi docker should be the simplest solution:

1. pi hole

2. Apache or ngnix

3. MariaDB 

(docker compose for 2&3)

By no means efficient but everything is already available for download/as blueprint.

 

It has. 7 years ago it probably had the old config files so you definitely need to learn a lot (again).

Thank you,

 

Ah yes docker and containers never messed around with those, but always wanted to poke them might be as good of a time as any.

Should get the Raspberry delivered Friday will start messing around with it over the weekend. Sort of interested to find out if I remember anything from way back.....

This is sort of a hobby project mostly due to the lockdown driving me crazy....

Who knows maybe this will lead me to code again?

Link to comment
Share on other sites

Link to post
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

×