How do I use subfolders of my server's IP address as their own "domains" without a FQDN

I am using a LAMP stack on Ubuntu 14x.

I want to use my server’s ip address/subfolder as a “root” domain ([client]), without using fully qualified domains (

How do I set this up?

I read about using the apache userdir module, which seems like it would work, but I don’t know how to add users.

I also read about setting up virtual hosts, but it seems like that only applies if you are using fully qualified domain names(?)


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

You can use IP addresses in virtual hosts too, e.g.:

<VirtualHost *:80>

For the userdir module:

sudo a2enmod userdir
sudo service apache2 restart

Apache uses the users on your droplet, so to add others:

sudo adduser newuser

… which creates the directory /home/newuser

sudo mkdir /home/newuser/public_html
sudo chmod 0755 /home/newuser/public_html

Apache will now serve files out of /home/newuser/public_html at the address