I am self hosting my own web server using apache2 with the service " afraid.org" so i can use my domain that i had back when i was paying for a VPS. I also have another domain I would like to use but not pointing to the /var/html/www as the other domain. is there some file i have to edit like how its done if adding domains to WHM/cPanel? like when you add a domain in cPanel is uses a folder with the name of the domain and that domain using whats in the folder.

  • RickRotHut@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    The apache2 setting you’re looking for is DocumentRoot together with Directory. And maybe VirtualHost or Named Host or ServerAlias.

    Depending how your webserver is configured now (using the default apache2 host?), you might want to add either a NamedHost or a VirtualHost with the new DocumentRoot.

    Can’t tell you how to do it via cPanel, but those settings are available in /etc/apache2/conf/apache2.conf or the like

    It’s common to have separate folders for different webservices like /var/www/html/yourwebservice.