I started development for ubuntu core. I want to host my php web app on the ubuntu core. The problem is that it is snap based OS an I can't install apache2 and other packages what i need to host my webpage. Can you offer a snap to host php web apps or there is any way to install apache2 on Ubuntu core?
-
1I think the easiest way is to install Docker, and then run the Webserver as a Docker container.– Artur MeinildMay 25 at 8:25
-
"Can you offer a snap to host php web apps or there is any way to install apache2 on Ubuntu core?" wrong place to ask; we are users just like you; if we could do this so could you :)– RinzwindMay 25 at 8:29
-
Ubuntu Core is targeted for IoT and embedded devices. Is there any particular reason why Ubuntu Server can't be used to host the site? 🤔– matigoMay 25 at 9:04
-
1Please edit your question to add new information and improve your question. Comments are intended to help you improve your question until it is answerable. Comments are not intended for conversation.– user535733May 25 at 11:20
-
1Considering requirements from both questions, I don't see a GUI app and Apache2 running together on anything other than Ubuntu Desktop. Not Server, not Core.– JosMay 25 at 13:23
1 Answer
@ArturMeinild thank you for your recommendation. It seems the best way to use docker. I find some tutorials with which anyone can start to implement web-server on ubuntu core. some help to start:
Download the Apache Image for Docker
docker pull httpd
Start the Apache Container
docker run -d --name [container-name] -p 80:[host-port] httpd docker run -d --name apache -p 80:80 httpd
type this in your browser:
http://localhost:[host-port]
to stop it
docker stop [container-name-or-id]
thx for your answers.
-
Hi - you're encouraged to write up the solution in your answer rather than link to solutions on 3rd party sites. Those sites can go down and render your answer useless. May 29 at 16:01