Hassio as a web server / addon

If you want to host multiple Apache2 Servers, you could install my other Apache2 addon:

I am distributing three variants. Maybe another variant already suits you needs.

Or you could download my apache2 addon, and then install it as a local addon, so you could host multiple instances of my addon (but you wont recieve auto updates etc for local addons).

I am just thinking of distributing another dummy addon, which would just be copy, but would need maintainance too.

1 Like

in fact GitHub - hassio-addons/addon-phpmyadmin: phpMyAdmin - Home Assistant Community Add-ons add one as all you need… he start nginx in fastcgi + php 8 in fpm mode and copy in the document root php my admin…

i think are simple to make add one from this to execute any web php code…

Hi,
I was trying to set up a server with nodejs instead of PHP, and I like the way that the motionEye addon solved the issues having the server in a subpath instead of on another port so you do not have to redirect more ports etc.
But I’m having problems with s6, I’m getting the following error:

s6-rc: info: service init-nginx: starting
s6-rc-oneshot-run: fatal: unable to exec /etc/s6-overlay/s6-rc.d/init-nginx/run: Permission denied
s6-rc: warning: unable to start service init-nginx: command exited 126
/run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.
/run/s6/basedir/scripts/rc.init: fatal: stopping the container.

In /rootfs/etc/s6-overlay/s6-rc.d/init-nginx/run I just copied paste the content of the motionEye script.

---
name: "Test"
description: "Test site"
version: "1.0.0"
slug: "test"
init: false
arch:
  - aarch64
  - amd64
  - armhf
  - armv7
  - i386
ports:
  80/tcp: null
host_network: true
map:
  - ssl
ingress: true
ingress_port: 0
ingress_stream: true
panel_icon: mdi:fruit-pear
options:
  ssl: true
  certfile: fullchain.pem
  keyfile: privkey.pem
schema:
  log_level: list(trace|debug|info|notice|warning|error|fatal)?
  ssl: bool
  certfile: str
  keyfile: str
privileged:
  - DAC_READ_SEARCH
  - SYS_ADMIN

Any idea what I’m missing?

Webseite wird nicht gefunden. Bitte Link korrigieren, Danke.

I updated the link in the original answer.

Is it possible to run PHP outside the HA front end using this addon?

Hello, I would like to use your addons Apache2, OpenSSL together with PHPmyadmin and Mariadb sql because i had this running before in a raspberry pi with my own made php website which grabs data from the mysql dbase but I can’t get it working in Home Assistant, the Apache2 UI gives me 502 bad gateway so I guess i first have to solve this issue?
In the raspberry I had no SSL active but I think I have to configure this too then? I have put my php webfiles int a folder and I can http the homepage but not everything is shown and how can I make this connect to the mariadb with ssl ?

yes, depending on what PHP extensions will be needed

Unfortunatly its hard to support ingress for any web page, so Ingress will throw this error on more complex sites easily.

I recommend just opening your website in the browser with a port:
http(s)://yourIPorHostofHAServer

Does this addon support rewrite function ?

I don’t use that feature, but yes theoretically my addon already supports it: [Feature Request]: mod rewrite · Issue #402 · FaserF/hassio-addons · GitHub

Unfortunately its not working.

Here is a simple .htaccess that i tried

RewriteEngine On
RewriteRule ^index.html$ /mysite/mylocation.html [L,R=301]

Error shown in addon

[Thu Jun 19 19:20:55.430457 2025] [core:alert] [pid 308:tid 308] [client 192.168.1.14:62456] /var/www/localhost/htdocs/mysite/.htaccess: Invalid command ‘RewriteEngine’, perhaps misspelled or defined by a module not included in the server configuration
192.168.1.14 - - [19/Jun/2025:19:20:55 +0530] “GET /mysite/index.html HTTP/1.1” 500 598

I have installed Apache2 service and using couple of php whebsites found online. I’m facing same secure connection error and sorry for my poor knowledge,

I’m unable to overcome issue and not sure how to configure open ssl for local php websites.

I’m not facing any issues with SSL if I use KSWEB on my Android phone.

Can someone guide me to overcome the ssl error for local websites which I have added on /share/htdocs??

Thanks in advance