You can do it. I am already hosting my website in my phone Ubuntu server.
https://www.google.com/amp/s/www.how2shout.com/how-to/how-to-install-ubuntu-linux-on-android-without-root.html
Step 1: Download UserLAnd App
This app is available on Google Play store, here is the link to download it. There is no complications in its installation just like any other, open Play store on phone either use the here given link or search for UserLAnd and when appears, tap to install it.
Step 2: Run UserLAnd to install Linux OS on Android
The moment, the app opens, you will see multiple Linux distros options along with their logos such as KALI Linux, Ubuntu, Alpine, Arch Linux, Debian along with lightweight Debian based Desktops with Xfce and Lxde desktop environment. It also has some Linux development, games and productivity apps. Well! here we are only about to focus on the process to run Ubuntu on Android. Tap on the Ubuntu icon.
Run Ubuntu Linux on Android using Userland

Step 3: Setup Username and Password for user and VNC
When you tap on the Ubuntu or any other Linux distros have given in UserLAnd, the first it will ask you to setup username, password and VNC password.
Type whatever you want and remember this will set as a standard user of your Android’s Ubuntu operating system. Once done, tap on the Continue option.
Create username and password for Ubuntu on Android

Step 4: Download Ubuntu for Android
The next thing which we need to select that how we would like to connect installed Linux OS Ubuntu on Android with SSH or VNC. I would like to use SSh which is simple and from the inbuilt terminal of UserLAnd, I can easily control my Linux operating system. We will also show later in this article how to use RealVNC to connect the existing Ubuntu, KALI or any other OS available on this Android application.
After that, it will say the files of Ubuntu to download on Android are of 80MB and would like to download it without Wifi, tap continue if you want to download them on mobile data. It will take a few minutes to set up all depend upon your internet connection speed.
ubuntu for android download

Step 5: Login to Android running Ubuntu
After the installation, as we have selected the SSH in the beginning, a terminal window will open. Now here just like regular Ubuntu server enter the password you have created above for your Ubuntu image running on Android.
Login to Android Ubuntu

Step 6: Update and Upgrade Ubuntu running on Android
Apart from the small screen and no init boot it is just like Windows 10 WSL, you will not feel any other differences on this Ubuntu Linux image, emulated on Android phone.
Thus, now we can use the keyboard to enter the command to our Linux. Let’s first update and upgrade all the packages of it. Run the following command
sudo apt-get update
sudo apt-get upgrade
Update and upgrade ubuntu running on Android
Step 7: Set the root password for Ubuntu
As we know by default there is no password for the root user, so to set that use the following command:
sudo passwd root
Enter Unix Password two times that you want to set and it will be done…
In this way, we can use this app to have Ubuntu for fun and experiment Linux on an Android phone or tablet. You can install further packages and LAMP environment.