If you like DNray Forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...

 

Home web hosting

Started by crtwins21, Jan 22, 2023, 06:54 AM

Previous topic - Next topic

crtwins21Topic starter

Hi there! I'm looking to self-host my website since I have a lot of large photos to upload for work and I need a lot of disk space. I've already installed apache, MySQL, and pcp on Ubuntu 19.10 to work with CMS webasist. I have a static IP and have registered and bought a domain, but I'm not sure how to connect them together.

I used to use hosting and everything was done in the panel with NS records, but now I'm not sure which way to go or what to even Google. Do you think installing Bind will be enough?

The registrar says that support was set up with default settings on their ns, but I need to know how to connect my domain name to my IP address so that my website shows up correctly. Any advice on what I should read up on and what steps I need to take next would be greatly appreciated. Thanks in advance!
  •  


pcoptimizer

To connect your domain name to your IP address, you'll need to go to the section in your registrar's control panel that manages NS/DNS servers/zones/records (names may vary between registrars). From there, you'll add an A-record with your domain and static IP address, such as "example.com .    A 1.2.3.4" (remember there should be a dot at the end of your domain). Note that there won't be an instant effect and the time it takes to take effect depends on the NS server settings.

If you want the site to be available at other URLs like www.example.com, you can either add more records by analogy or use a CNAME record, like "www.example.com .    CNAME    example.com."
  •  

JacobLindS

To keep your server running, it's important to have two IP addresses - one for the primary server and another for the secondary server. When I registered my domain, it took only two hours for it to become available. Dynamic DNS providers typically take even less time, sometimes as little as one minute.

As for using DNS servers, you can either use the registrar's built-in servers or opt for a third-party provider like Google DNS. Ultimately, it's up to you to decide which option best suits your needs.
  •  

yestyle

You can create a reliable and uninterrupted server for free, but there are several important factors to consider. First, your computer or laptop must be connected to the internet or a local network, such as a home Wi-Fi router. The method in the article specifically applies to Windows operating systems.

In the event that you encounter any issues while setting up your server, it's always an option to seek help from professionals.
  •  

TreO

You need to access your domain registrar's control panel. This is where you can manage your domain settings. Look for the section that allows you to manage DNS settings or records. You'll want to create an A record that points your domain to your static IP address. The A record is a type of DNS record that maps a domain name to an IP address.

For example, if your domain is example.com and your static IP is 123.45.67.89, you would create an A record that looks something like this:

Hostname: @ (this symbolizes the root domain)
Type: A
Value: 123.45.67.89
Depending on the registrar, it might take some time for these changes to propagate across the internet, usually within a few hours, but it can sometimes take up to 48 hours.

Now, regarding BIND, you don't necessarily need to install it unless you want to run your own DNS server. If your domain registrar provides DNS services, it's often easier to manage your DNS records directly through them. This way, you avoid the complexity of setting up and maintaining your own DNS server.

Once you have your A record set up, you can also consider setting up a CNAME record if you want to point subdomains (like www.example.com) to your main domain. This would look like:

Hostname: www
Type: CNAME
Value: example.com
After you've configured the DNS records, ensure that your Apache server is set up to serve your website. You'll need to configure a virtual host for your domain in Apache. This usually involves creating a configuration file in the /etc/apache2/sites-available/ directory. Here's a basic example of what that file might look like:

<VirtualHost *:80>
    ServerName example.com
    ServerAlias www.example.com
    dоcumentRoot /var/www/html/yourwebsitefolder

    <Directory /var/www/html/yourwebsitefolder>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
After creating this file, don't forget to enable the site with sudo a2ensite yourconfigfile.conf, and then restart Apache with sudo systemctl restart apache2.

Finally, to ensure everything is working properly, you can use tools like ping, nslookup, or dig from your terminal to check if your domain is resolving to your IP address correctly.
Focus on setting up the A record at your registrar, optionally a CNAME for subdomains, configure Apache to serve your website, and test your setup. This should get your self-hosted website up and running smoothly.
  •  


If you like DNray forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...