Setup "own Web Hosting" on ZimaOS

Hello ZimaOS Team,

I had brought up that ZimaOS has no “Web-Hosting” to have own Webpage “Treating Web hosting Server” Like IIS Server that one.. Wondering have like ZimaOS.. I had seen my other NAS such as ASUSTOR NAS has a built in “Apache HTTP Server” and “Nginx Server” as well… It would be great to have ZimaOS own Apache HTTP Server and Nginx Server built in..

Thanks you all ZimaOS Team and Staff.

Anthony G.

Usually people use docker platform to run applications, however if you want to spin up a docker instance of a web server, you can, just that I wouldn’t recommend publicly hosting anything on a zimaOS machine.

If you are into web development or just making a local web server, then I would go this route as you can customize the web container environment, and be able to access the www pages from the zima system.

But as like a generic http server you wouldn’t make an app just for that because environment is customized. So that is why its not going to be an app store app.

The system does have a web server per say, but for a web server independent from zimaos you would set it up in its own container. This one below will setup apache in an ubuntu container with port 10000 open to webmin after the install so I would have an easy way to access the container files and edit them.

go into settings→general scroll down to Developer mode and press the view button. Turn on ssh access.

SSH into the zimaOS box by using the root user name and the root password you set up the zimaOS from a different computer.

once in you should be logged in at root in the home folder

root@ZimaOS:~ ➜ # 

then go into the native system mount and add the www directory

cd /media/ZimaOS-HD 
mkdir www
mkdir .apache
cd .apache
nano Dockerfile


Then put the contents below in Dockerfile, and save (Ctrl+o, then Enter) and exit (Ctrl+x)

FROM ubuntu:latest

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update
RUN apt-get install -y apache2 apache2-utils curl gnupg perl libnet-ssleay-perl openssl sudo


EXPOSE 80/tcp 443/tcp 10000/tcp



CMD ["apache2ctl", "-D", "FOREGROUND"]






Then we build the docker container

docker build -t apache .

Then we install it:

docker run -d -p 8080:80 -p 8443:443 -p 10000:10000 --restart always --log-opt max-size=10m --name apache -v /media/ZimaOS-HD/www:/var/www/html apache:latest

Now your web server you installed is on port 8080 with webmin on port 10000 and the www directory is accessible as well through zimaOS on the install drive’s root directory

If you need to install webmin, mysql, php and phpmyadmin in that container, you just drop into the command line from either inside webmin or execute in the ssh terminal: docker run -it apache bash and run the appropriate install commands for ubuntu command line.

Later on if you decide to run https in the apache web server instance, port 443 is forward to the outside on 8443. After you generate a certificate with openSSL and install it in the Apache config file.