I’ve just run out of options, tried every single topic answer related with Sub-Domains on Virtualmin but im not able to setup it correctly.
I’ve created my sub domain such as: boards.domain.com so it SHOWS my forum content from User/public_html/Board
But it’s impossible! It keeps me redirecting itself to main domain lol with that subdomain on web url…
This due to being using cloudflare pointing www.boards to my server’s ip.
Am i having some error or something? With cPanel i would simply add the folder path to the sub domain and voila…
Even if i try to go into his direct folder (nginx) im getting HTTP ERROR 500 from domain.com/Board/public_html/index.php (Sub Server)
Hi, creating subdomain with virtualmin is very easy:
- go to virtualmin and select domain
- click on create virtual server
- there on click on menu on top of the page sub-server
- fill name for subdomain aka boards (virtualmin will fill full subdomain name for you automatically aka boards.domain.com)
- review what options server should have aka mysql etc. and hit create button
It takes less then 10 seconds. Also please note that subdomains are stored outside of /public_html/ folder. You can found all subdomains for that domain.com in /home/server-user/domains/ folder which is to my opinion much better then folder in /public_html/ folder.
the subdomain would become available asap after sub server is created in case you manage your dns-es on your own. If you not manage your own dns-es, you just add subdomain to your domain registar panel and point it to your server IP. Same is for cloudflare I think, you just need to do extra step on their platform to let cloudflare know that there is subdomain.
I’ve made all that exactly as you said before creating my topic and my domain redirects me to my homepage…
hi, sorry to hear that you still have trouble with that… I would check apache logs also have look on dns and apache conf files for that domain. whats the distro you running on?
It is actually really easy, as unborn explained. But if you add a sub-domain you also has to add that “sub” in your DNS record otherwise it wont work. We use nameservers and DNS record administration that is provided by the same company that also hosts our dedicated servers. I don’t know how your NS and DNS is set up but I think that could be your problem.
And also, as unborn pointed out, the sub domains are stored outside the domains public_html, if they are stored under domains public_html they are just sub-folders.
I think your sub “board.domain.com” should be found in
This is a “the wrong site shows up” kind of problem. There’s a FAQ for that: https://www.virtualmin.com/documentation/web/troubleshooting#toc-the-wrong-site-shows-up-V5JtxdKg
It’s usually that there’s some sites with IP:80 VirtualHost definitions and others with *:80. That’ll cause difficult to predict responses from Apache.
Oh, wait, actually…I see you’re using nginx, which has a wholly different way of handling virtual hosts, and so this isn’t the problem documented by the item I linked to. That might be DNS-related. If you want to open a private support ticket in the issue tracker with the actual hostnames and IP addresses, we can probably sort it out pretty quickly.
what was the problem? dns record pointing?