+ 3

Can I use subdomain with same server?

I was wondering could I use one apache server to host both sites. Like if I connect to the subdomain it detects it and uses different root. The root for subdomain is /author.webprojects.pw I want apache to use it when connected to the author subdomain

7th Oct 2018, 2:57 PM
Toni Isotalo
Toni Isotalo - avatar
3 Respostas
+ 2
Sounds like you're looking for Apache Virtual Hosts. You can route document root based off Server Name in Apache's config. Probably a bit much to get into on here but theres many guides online depending on your set-up such as: https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-16-04
7th Oct 2018, 4:20 PM
Voxel
Voxel - avatar
0
:) This is the moment people usually first realize that "www." isn't just there to be pretty -- it's a host too.
7th Oct 2018, 5:34 PM
Kirk Schafer
Kirk Schafer - avatar
9th Oct 2018, 3:38 PM
Ivan Belousov
Ivan Belousov - avatar