First create a directory for each site. Some people choose to put these in the home folder, but we would like you to be more organized so let's do this in a different way under /var/www/.
In linux you can place decimals in a file or folder name, so let's create the folder with the website domain name. It will be easier for you to know what is inside each folder.
Doing it from webmin is pretty fast. Just go to: Others/File Manager (This require java in your browser) and create the folder under /var/www using the "yourdomain.com" format or whatever naming scheme you want to use:
Once you have the folder created, you can go ahead and setup the host in Webmin. For this you must go to Servers/Apache Web Server (please make sure you "Start Apache" at the top right corner) and click on the tab named "Create Virtual Host". You will get a screen like this:
- You can leave it at "Any address" for now.
- Leave the next boxes checked.
- Set the port number to 80.
- In "Document Root" click on the button at the right of the box and it will open a pop up windows for you to browse the server's folders. Make sure you browse to /var/www and the folder you created. Click OK to return to the "Create Virtual Host" screen and there you must see the path to the folder you created for this website.
- Check "Allow access to this directory"
- Set the server Name to the domain you are creating this host to without the "www"
- Add virtual server to file. Leave it on "New file under...".
- Click on "Create Now"
It the Virtual Host has been created then we need to make a little more changes to finish this.
Click on the Virtual Host you just created. This will open the "Virtual Server Options page:
Click on "Edit Directives" and under the line "ServerName yourdomain.tld", insert a line that says the following:
This is an example of how this file must be (replace yourdomain.tld with the domain you are setting up):
allow from all
You will be taken back to the "Virtual Server Options page"
At the top right corner click on "Apply Changes" and we are all done here.
Now follow the next article about setting up the DNS and Creating a Username so you can upload your website.
Thank you for reading.
ServerPronto’s Dedicated Servers are the economical choice for providing an exclusive set of resources solely devoted to your IT needs. With our bare metal servers, you will benefit from:.