Skip to content

Virtualmin Setup DigitalOcean

Solved Customisation
26 2 9.8k 1
  • Hi, today i am setting up a new DO droplet and i was trying to refer old discussion and i could not find it. i opened phenomlab and metabullet both websites are not working

    I am referring to this doc https://www.digitalocean.com/community/tutorials/how-to-install-virtualmin-with-webmin-lamp-bind-and-postfix-on-ubuntu-16-04

    I’m hoping it will work as expected

    @Hari both of those sites were taken down some time ago. I can put metabullet.com back up without too much issue if necessary, but most of the content there was superseded by Sudonix.

    Was there anything in particular you needed ?

  • @Hari both of those sites were taken down some time ago. I can put metabullet.com back up without too much issue if necessary, but most of the content there was superseded by Sudonix.

    Was there anything in particular you needed ?

    @phenomlab no need to bring those sites back. i am just documenting here 😄

    I’m already seeing the virtualmin login page. now need to update and add domains

  • @phenomlab no need to bring those sites back. i am just documenting here 😄

    I’m already seeing the virtualmin login page. now need to update and add domains

    @Hari good. What’s this going to be for out of curiosity ?

  • @Hari good. What’s this going to be for out of curiosity ?

    @phenomlab we have bunch of subdirectories (domain.com/ask, news…) moving them to subdomains (news.domain.com)

    once everything works perfectly we may stop using CW

  • @phenomlab we have bunch of subdirectories (domain.com/ask, news…) moving them to subdomains (news.domain.com)

    once everything works perfectly we may stop using CW

    @Hari sounds like a good plan.

  • @Hari sounds like a good plan.

    @phenomlab this gonna be a production build. which mySQL option do you suggest? flarum, and 3 to 4 wordpress sites should i go with 1GB MySQL option? we can change this later right?

    4GB ram 2vCPU AMD

    a182bd99-fbcf-4c9c-a9fc-b5af2ef22d16-image.png

    Edit: i went forward with 1GB MySQL allocation option

  • @phenomlab this gonna be a production build. which mySQL option do you suggest? flarum, and 3 to 4 wordpress sites should i go with 1GB MySQL option? we can change this later right?

    4GB ram 2vCPU AMD

    a182bd99-fbcf-4c9c-a9fc-b5af2ef22d16-image.png

    Edit: i went forward with 1GB MySQL allocation option

    @Hari yes, this should be fine.

  • @Hari yes, this should be fine.

    @phenomlab one quick question

    host.domain.com virtualmin main domain used during setup (host)
    site.domain.com virtual server created in virtualmin

    i have lets encrypt certificates for both subdomains

    CF A name record is proxed, both sites are opening

    but when i try to access Virtualmin panel by using host.domain.com:10000 it is not opening

    but IP:10000 is working

    what am i missing?

    is CF preventing port access?

  • @phenomlab one quick question

    host.domain.com virtualmin main domain used during setup (host)
    site.domain.com virtual server created in virtualmin

    i have lets encrypt certificates for both subdomains

    CF A name record is proxed, both sites are opening

    but when i try to access Virtualmin panel by using host.domain.com:10000 it is not opening

    but IP:10000 is working

    what am i missing?

    is CF preventing port access?

    @Hari said in Virtualmin Setup DigitalOcean:

    is CF preventing port access?

    Yes, but not at the port level. The reason for this is that CF is handling the DNS side of things so when you try to access using your browser, it’s going to resolve to the address in DNS that resolves to CF.

    There’s a number of choices depending on your scenario.

    The most common approach is to create a page page rule that bypass the CF proxy and allows direct access. The issue here of course is that the free plan on CF only allows a small amount of ports, so you’d need to change the VirtualMin listener port to something else dish as 8443 which is routable in the free plan. You can change the VirtualMin port as explained here

    Another approach is to use a management station that has access, and then create a HOSTS file entry that contains a mapping from hostname to IP that overrides the DNS but only for your machine. The preferred order of resolution means host files are read before DNS, and if a match is found then that is used and DNS is ignored.

    The drawback with this is that you’d need to make this change on every single machine where you wanted to gain access. Not insurmountable, but quite clunky if you frequently used multiple machine or your phone to get access.

    The last method, which is by far optimum is to use a vacant or unused domain to access VirtualMin. I do this myself, and it just means that this domain has no other purpose other than to manage the VPS. In other words, it’s not used for web hosting etc. You can still host the DNS in CF, but you’d then need to ensure the proxy is disabled.

  • @Hari said in Virtualmin Setup DigitalOcean:

    is CF preventing port access?

    Yes, but not at the port level. The reason for this is that CF is handling the DNS side of things so when you try to access using your browser, it’s going to resolve to the address in DNS that resolves to CF.

    There’s a number of choices depending on your scenario.

    The most common approach is to create a page page rule that bypass the CF proxy and allows direct access. The issue here of course is that the free plan on CF only allows a small amount of ports, so you’d need to change the VirtualMin listener port to something else dish as 8443 which is routable in the free plan. You can change the VirtualMin port as explained here

    Another approach is to use a management station that has access, and then create a HOSTS file entry that contains a mapping from hostname to IP that overrides the DNS but only for your machine. The preferred order of resolution means host files are read before DNS, and if a match is found then that is used and DNS is ignored.

    The drawback with this is that you’d need to make this change on every single machine where you wanted to gain access. Not insurmountable, but quite clunky if you frequently used multiple machine or your phone to get access.

    The last method, which is by far optimum is to use a vacant or unused domain to access VirtualMin. I do this myself, and it just means that this domain has no other purpose other than to manage the VPS. In other words, it’s not used for web hosting etc. You can still host the DNS in CF, but you’d then need to ensure the proxy is disabled.

    @phenomlab as suggested i have made a few changes

    changed my port
    changed my host domain from host.domain.com to hos.domain2.com for extra CF page rules

    how can i disable others accessing my IP?
    instead of using hos.domain2.com to manage virutalmin can i directly use my IP to access virtualmin?
    if i proxy or deny direct access to my IP how to give FTP access to one of my admin? as currently we use IP
    they need to access using FTP:hos.domain2.com?

    should i proxy hos.domain2.com at CF? currently i can not access Virtualmin using port how to add page rule to allow my port

  • @phenomlab as suggested i have made a few changes

    changed my port
    changed my host domain from host.domain.com to hos.domain2.com for extra CF page rules

    how can i disable others accessing my IP?
    instead of using hos.domain2.com to manage virutalmin can i directly use my IP to access virtualmin?
    if i proxy or deny direct access to my IP how to give FTP access to one of my admin? as currently we use IP
    they need to access using FTP:hos.domain2.com?

    should i proxy hos.domain2.com at CF? currently i can not access Virtualmin using port how to add page rule to allow my port

    @Hari said in Virtualmin Setup DigitalOcean:

    how can i disable others accessing my IP?

    Can you clarify this part ? Are you looking to hide the real IP behind CF ?

    @Hari said in Virtualmin Setup DigitalOcean:

    instead of using hos.domain2.com to manage virutalmin can i directly use my IP to access virtualmin?

    Yes, if you aren’t worried about certificate errors

    @Hari said in Virtualmin Setup DigitalOcean:

    should i proxy hos.domain2.com at CF? currently i can not access Virtualmin using port how to add page rule to allow my port

    No, do not proxy it. As soon as you do that, DNS will resolve at CF and not the actual server itself.

  • @Hari said in Virtualmin Setup DigitalOcean:

    how can i disable others accessing my IP?

    Can you clarify this part ? Are you looking to hide the real IP behind CF ?

    @Hari said in Virtualmin Setup DigitalOcean:

    instead of using hos.domain2.com to manage virutalmin can i directly use my IP to access virtualmin?

    Yes, if you aren’t worried about certificate errors

    @Hari said in Virtualmin Setup DigitalOcean:

    should i proxy hos.domain2.com at CF? currently i can not access Virtualmin using port how to add page rule to allow my port

    No, do not proxy it. As soon as you do that, DNS will resolve at CF and not the actual server itself.

    @phenomlab i thought once i set up the host domain i no longer need to access Virtualmin using IP. later realized that is not how it works.

    how do i install PHPmyadmin to all servers (domains)? … right now i had to do it manually for each and every domain

    though i install phpmyadmin for one domain it is not working, i have tired restarting server and all.

    cdda0c3b-2833-4d10-abbc-49b1f52087f5-image.png

  • @phenomlab i thought once i set up the host domain i no longer need to access Virtualmin using IP. later realized that is not how it works.

    how do i install PHPmyadmin to all servers (domains)? … right now i had to do it manually for each and every domain

    though i install phpmyadmin for one domain it is not working, i have tired restarting server and all.

    cdda0c3b-2833-4d10-abbc-49b1f52087f5-image.png

    @Hari What is in the error log ? Typically, you’d only need to install phpMyAdmin once and as long as it can see your MySQL server and databases, this should be fine.

    That’s a HTTP 500 error which indicates an issue on your side.

  • @Hari What is in the error log ? Typically, you’d only need to install phpMyAdmin once and as long as it can see your MySQL server and databases, this should be fine.

    That’s a HTTP 500 error which indicates an issue on your side.

    @phenomlab i messed the server, now i can not delete and reinstall.

    i have created subdomain1, 2, 3 as main servers instead of creating domain and adding them as sub servers. during this process, i requested for more than 5 let’s encrypt certificates and reached the daily limit. Now i have manually bought one certificate from CF Origin Certificate for 15years and installed it for the main domain

    moved all servers as sub servers now i see 403 error

    i hope i do not have any SSL issues all i get is 403 for 3 subdomains how can i fix it?

    Forbidden
    You don'\t have permission to access this resource.
    

    i did not move my main domain yet - planned to move after 1week

  • @phenomlab i messed the server, now i can not delete and reinstall.

    i have created subdomain1, 2, 3 as main servers instead of creating domain and adding them as sub servers. during this process, i requested for more than 5 let’s encrypt certificates and reached the daily limit. Now i have manually bought one certificate from CF Origin Certificate for 15years and installed it for the main domain

    moved all servers as sub servers now i see 403 error

    i hope i do not have any SSL issues all i get is 403 for 3 subdomains how can i fix it?

    Forbidden
    You don'\t have permission to access this resource.
    

    i did not move my main domain yet - planned to move after 1week

    @Hari what’s in the NGINX error logs for each of these domains ? Looks like a permissions issue to me

  • @Hari what’s in the NGINX error logs for each of these domains ? Looks like a permissions issue to me

    @phenomlab where do i find it? i think i am not using it

    109116a1-15e3-4193-8ce9-276652831fb9-image.png

  • @phenomlab where do i find it? i think i am not using it

    109116a1-15e3-4193-8ce9-276652831fb9-image.png

    @Hari you have the apache build. In that case, can you post one of the virtualhost configs (for one of the domains)

  • @Hari you have the apache build. In that case, can you post one of the virtualhost configs (for one of the domains)

    @phenomlab where can i find it? sent PM

  • @phenomlab where can i find it? sent PM

  • Can you post the configs here remembering to redact sensitive information, and also use the code markers (three backticks) as this makes it much easier to read rather than standard text in a PM.


Did this solution help you?
Did you find the suggested solution useful? Support 💗 Sudonix with a coffee
If your organisation needs deeper expertise around infrastructure, security, or technology leadership, learn more about Phenomlab Ltd. Many of the deeper technical guides behind Sudonix are published there.

Related Topics
  • 6 Votes
    36 Posts
    11k Views
    @justoverclock said in Digitalocean step by step guide to nginx configuration: i’m learning And that’s the whole point of this site If you don’t learn anything, you gain nothing.
  • 4 Votes
    8 Posts
    4k Views
    @phenomlab Sorry to delay in responding, yes as i mentioned above, i had to remove my redis from docker and reinstall a new image with this command docker run --name=redis -p 127.0.0.1:6379:6379 -d -t redis:alpine and now when i test my ip and port on https://www.yougetsignal.com/tools/open-ports/ the status of my redis port is closed. I think which to configure firewall in droplet digital ocean is a good idea too, and i will configure soon. Thanks for the help!
  • how to use CF tunnels with Virtualmin?

    Solved Configure cf tunnel cloudflare virtualmin
    10
    3 Votes
    10 Posts
    3k Views
    @Hari DDoS protection is not just a switch, or one component. It’s a collection of different and often disparate technologies that when grouped together form the basis of a combined toolset that can be used in defence. Typically these consist of IDS (Instrusion Detection System) and IPS (Intrusion Prevention System) components that detect irregularities in network traffic, and will take decisive action based on predefined rulesets, or in the case of more modern systems, AI and ML. Traditional “traffic shaping” technology is also deployed, so if an attack cannot be easily identified as malicious, the bandwidth available to that connection is severely limited to nothing more than a trickle rather than a full flow. Years ago, ISP’s used traffic shaping (also called “policers”) as an effective means of stopping applications such as BearShare, eDonkey, Napster, and other P2P based sharing systems from functioning correctly - essentially reducing the “appeal” of distributing and seeding illegal downloads. This was essentially the ISP’s way of saying “stop what you are doing please” without actually pulling the plug. These days, DDoS attacks are designed to overwhelm - not assume control of - webservers and other public facing components. It’s rare for small entities to be attacked unless there is some form of political agenda driven by your site or product. A classic example is governmental institutions or lawmakers who effectively are classed as “enforcers” and those who disagree are effectively making a statement in the form of Denial of Service. DDoS protection is effectively the responsibility of the hosting provider, but you shouldn’t just assume that they will protect you or your site. Their responsibility stops at their infrastructure, so it’s then up to you too decide how you full the gap in between your host and the website. Typically, you’d leverage something like Imunify360 which you can get for Plesk (and something I’d strongly recommend) but it’s not free, and is a paid (not expensive per month) subscription. If you want to use VirtualMin then there are a variety of tools readily available out of the box such as firewalls and fail2ban.
  • Issues getting Flarum to work on new host

    Solved Configure virtualmin
    65
    14 Votes
    65 Posts
    24k Views
    @crazycells huh. Thanks. Will need to check that as well.
  • how to increase upload DB file size in virtualmin

    Solved Configure virtualmin
    2
    1 Votes
    2 Posts
    1k Views
    @Hari this helped
  • SSl expired on virtualmin

    Solved Configure virtualmin ubun server ssl
    18
    3 Votes
    18 Posts
    5k Views
    @justoverclock Not necessarily. You only need to use this if it fails from the Virtualmin window
  • Email issue (virturalmin)

    Solved Hosting virtualmin
    5
    0 Votes
    5 Posts
    2k Views
    @gotwf said in Email issue (virturalmin): @jac Typically you want your domain’s MX records to point to FQDN server name, e.g. foo.example.eg % drill stockportcounty.fans mx ;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 63911 ;; flags: qr rd ra ; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;; stockportcounty.fans. IN MX ;; ANSWER SECTION: stockportcounty.fans. 600 IN MX 10 stockportcounty.fans. Yours do not. Although a bit more drillin’ and reverse lookup indicates thusly; % drill stockportcounty.fans ;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 160 ;; flags: qr rd ra ; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;; stockportcounty.fans. IN A ;; ANSWER SECTION: stockportcounty.fans. 600 IN A 65.108.63.35 ;; AUTHORITY SECTION: ;; ADDITIONAL SECTION: ;; Query time: 127 msec ;; SERVER: 204.8.232.207 ;; WHEN: Sun Oct 10 19:37:02 2021 ;; MSG SIZE rcvd: 54 <kvg@loon:~>% drill -x 65.108.63.35 ;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 57802 ;; flags: qr rd ra ; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;; 35.63.108.65.in-addr.arpa. IN PTR ;; ANSWER SECTION: 35.63.108.65.in-addr.arpa. 86400 IN PTR vps.stockportcounty.fans. I think you probably want your mx record to point to vps.stockportcountry.fans. It is important for forward and reverse lookups for MX records jive. Maybe you are looking like a spammer in that they do not? Edit: But at least you have a reverse record, many spammers do not, so that is a big red flag. Thanks for the advice, will look into it all later once back home.
  • Digitalocean Ubuntu configuration

    Solved Linux
    33
    12 Votes
    33 Posts
    10k Views
    @phenomlab thank you! not me