troubleshooting Question

Ubuntu 21.04 and creating virtual host and location of websites

Avatar of dogsareit
dogsareitFlag for United States of America asked on
UbuntuLinuxLinux OS DevLinux Distributions
14 Comments1 Solution29 ViewsLast Modified:
I am migrating from Windows 10 platform running Wampserver with PHP 7.4 to Ubuntu 21.04.
I have been reading and reading, and am now confused.
I have three websites that I created under /var/www - site 1, site 2, site 3 on my Ubuntu computer ( all Ubuntu - no dual environment)
I wanted to create a virtual host for each one i.e., site
In all the examples I have seen, the examples  create a .com under public_html.
 I find this confusing. Does that mean I need to move my websites to there instead of having them at /var/www ? I want to be able to execute my apps in each website.
In windows, these websites were under wamp/www/site1 etc.
 And I executed the app I wanted by using: http://localhost:8081/site1/some.php.
How does all this tie together ? Can they all three used 80 ??
I understand that I need to create a,conf file etc.
i do not find a public_html folder. But as I understand it, I can use home/USER/public_html.
I do nit have a public_html  in there either. Is that a folder I need to create ? And then should I place my websites there instead of /var/www ??
Could someone explain it to me ?
Thank you for any help - it is appreciated.

Jim Riddles
Prepress/OMS Specialist

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 14 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 14 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros