this post was submitted on 20 Oct 2023
3 points (100.0% liked)

Self-Hosted Main

504 readers
1 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

For Example

We welcome posts that include suggestions for good self-hosted alternatives to popular online services, how they are better, or how they give back control of your data. Also include hints and tips for less technical readers.

Useful Lists

founded 1 year ago
MODERATORS
 

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.

top 1 comments
sorted by: hot top controversial new old
[–] RickRotHut@alien.top 1 points 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.