S
S
somethinginterest2016-02-29 23:25:32
Apache HTTP Server
somethinginterest, 2016-02-29 23:25:32

How to set up a domain and ssl on apache (on your computer)?

As I understand it: DNS are unique addresses inside which my site is already searched (for example, by ip)
, that is, when you go to http://mydomain/ -> search to which dns this domain belongs to, finds dns -> further inside this dns the necessary ip is substituted for my domain accordingly
, it seems that I understood everything correctly, now my situation and question:
I bought a domain, I already connected it to a third-party hosting and it was like this: I registered the dns specified by the hosting, and in the hosting itself I parked my site to this domain - now it's all transparently clear
now I detached the same domain from that hosting and I want to attach it to my web server installed on my own computer (using vmware, virtual machine) on apache (debian8), in the administration of which I have no experience at all I
searched on the Internet like this do and came across this article . and as I understand it, it is proposed here to register your own dns servers using bind, did I understand correctly?
that is, at first I imagined it like this:
http://mydomain/ -> dns of my provider (in my case, mgts) -> my ip,
respectively, was going to indicate dns mgts on the domain registration site, and then I thought of somehow connecting my ip and domain inside dns mgts
and the article seems to mean this:
http://mydomain/ -> my own dns -> my ip is inside my dns (no idea how it will be, or is it a localhost?)
seems to mean that bind binds my ip (inside the provider's dns) to the new dns (my own) , and pointing to my dns in the future, I immediately point to my computer//or this is wrong//, and then in the bind settings I set the domain and ip (localhost?) to match,
in general, now it all seems confusing to me, please help me understand
and how to Do I end up attaching a domain to a site on my own web server (on my machine, running apache, installed on debian, running on a wmvare virtual machine)?
and also how to attach an ssl certificate to it (and first mail like [email protected])?
Thank you

Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
Pavel, 2016-03-01
@Ingg

Greetings! I don't see the point in deploying my own DNS server. I advise you to use any free one (there are a lot of them).
We go to the PU of the domain, specify the NS server of our DNS hosting (for example, cloudflare) -> add a record of type A. Example:
Subdomain __ Type______Address:
[email protected]_______ A______ Your static IP.
PSS give up Apache before it's too late :)

S
Saboteur, 2016-03-01
@saboteur_kiev

You have a terrible mess in your head
. Sit quietly for an hour and a half, read Wikipedia.
DNS is a domain name system.
There are several types of records.
A record specifies for normal links (the most popular)
MX record for mail
has aliases for redirects.
When you try to access a domain name, it resolves to a specific IP address.
the phrase "to which dns this domain belongs" sounds completely inadequate.
Having already gone to a specific IP address, that is, having connected to the server by IP address, the web server on this IP address decides which site to give to the client (if it has several sites-virtualhosts configured)
That is, you need to set up your domain so that yourdomain.com points to the IP address of the machine with the web server. If the web server is on a virtual machine, then forward HTTP ports (80 and 443 for https) inside the virtual machine.

S
Sergey, 2016-03-01
@hamnsk

All posts above can be reduced to one simple one:
1. Do you have a public IP address? (myip.ru) and what is assigned to your computer / router match?
2. Do you have experience in setting up network equipment, in particular port forwarding, since your server, as you described, will probably be behind NAT on a virtual machine.
3. Does it make sense, calculate the cost of electricity per month so that your VM is online 24-7 (believe me, any VDS will be cheaper at times)
4. What is your goal in general?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question