Multicraft Panel with Domain name

Discussion in 'Systems Administration' started by xPyroPhoenix, Apr 22, 2019.

  1. I use multi craft with Ubuntu on my dedicated server.

    So, I currently have a domain name with goDaddy and that redirects to <ip>/multicraft.
    However I was wondering if I could just do something like multicraft.<domain> and instead of having it redirect to the IP, it will stay as multicraft.<domain>. As in the domain would just access multicraft’s panel directory directly.
    I’ve seen other servers do this before and I was wondering how to.
    I wasn’t sure which category to post this in so I just posted it here.
     
  2. Yes, which web server do you use?

    This is my virtual host for Apache using LetsEncrypt to secure HTTPS traffic, feel free to adapt it;

    Code (Text):

    <VirtualHost *:80>
        ServerName panel.<DOMAIN>
        ServerAdmin [email protected]<DOMAIN>
        DocumentRoot /var/www/<DOMAIN>/panel
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
        <Directory /var/www/<DOMAIN>/panel>
            AllowOverride All
        </Directory>
    </VirtualHost>

    <IfModule mod_ssl.c>
        <VirtualHost *:443>
            ServerName panel.<DOMAIN>
            ServerAdmin [email protected]<DOMAIN>
            DocumentRoot /var/www/<DOMAIN>/panel
            ErrorLog ${APACHE_LOG_DIR}/error.log
            CustomLog ${APACHE_LOG_DIR}/access.log combined
            Include /etc/letsencrypt/options-ssl-apache.conf
            SSLCertificateFile /etc/letsencrypt/live/<DOMAIN>/fullchain.pem
            SSLCertificateKeyFile /etc/letsencrypt/live/<DOMAIN>/privkey.pem
            <Directory /var/www/<DOMAIN>/panel>
                AllowOverride all
            </Directory>
        </VirtualHost>
    </IfModule>
     
     
  3. I’m not sure what you mean by web server, but I use apache2, phpmyadmin and MySQL. Also my multi craft panel is currently /var/www/html/multicraft. Should I change it? And what do I have to do with my godaddy domain exactly?
     
  4. If you want to only run your Multicraft panel on your server then under GoDaddy you only need to add an 'A' record which would be called something like 'multicraft' and the IP would the IP of the server you are running Multicraft on.

    If you want to run multiple sites Apache2 allows for a construct called virtual hosts, this allows you to run many different websites on the one Apache2 installation in Ubuntu you create a file in /etc/apache2/sites-available/my-wesite.net.conf and enable it using
    Code (Text):
    sudo a2ensite my-website.net.conf
    . This file should contain the code I supplied with changes to your liking. Then in GoDaddy you'll need to a an A record which points to your server.
     
  5. I don't know if I'm just being stupid, but which file are you referring to?
     
  6. that what you want is called "reverse proxy" (atleast in nginx, not sure with apache)

    they are refering to a "Site" in apache, you can have multiple, not just the "default" one, have you used apache/nginx so far?
     
  7. Sorry, I should have explained this;

    If you are using Ubuntu you can create a file in /etc/apache2/sites-available/ - so you would do something like;
    Code (Text):
    sudo nano /etc/apache2/sites-available/<your domain>.conf
    Then use;
    Code (Text):
    sudo a2ensite <your domain>.conf
    (.conf is optional)

    This enabled the site which will be served when you access multicraft.<your domain>

    See https://www.digitalocean.com/commun...inux-apache-mysql-php-lamp-stack-ubuntu-18-04 for help setting this up on Ubuntu 18.04

    If you are using CentOS or another distribution, including Windows, the installation varies and these steps won't work. See instructions for your own distribution.
     
  8. I recommend using
    https://pterodactyl.io/
    Its way more secure, everything is SFTP and the whole panel is 10x faster.
     
  9. cant really recommend pterodactyl myself... its awful, specially for beginners, support & setup is not good at all
     
  10. this isn't even relevant to the issue since it's not a Multicraft issue, it just seems like an ad for competing software