[SOLVED] Domain A record on registrar to directory on server?

General support questions
Post Reply
PresFox
Posts: 11
Joined: 2018/05/21 08:55:26

[SOLVED] Domain A record on registrar to directory on server?

Post by PresFox » 2018/06/03 13:49:07

Hello,

I bought a domain and put an A record there to redirect to the server. This works perfectly, but redirects to the main root. How can i point that domain to a specific folder on the server?

Regards

scottro
Forum Moderator
Posts: 2556
Joined: 2007/09/03 21:18:09
Location: NYC
Contact:

Re: Domain A record on registrar to directory on server?

Post by scottro » 2018/06/03 16:20:41

If I understand your question, this would be done on the server, using whatever web server you use to direct queries to the proper directory. If 1.2.3.4 goes to mysite.com, on 1.2.3.4, apache, for example, is running with a configuration file that says DocumentRoot is directoryX, the directory on the server containing your web site.
New users should check the FAQ and Read Me First pages

PresFox
Posts: 11
Joined: 2018/05/21 08:55:26

Re: Domain A record on registrar to directory on server?

Post by PresFox » 2018/06/03 19:46:13

Hello,

I know, but i want to use a seperate directory for this domain.

I tried setting up a virtualhost file, but it doesnt seem to work, the domain still shows the main root of the server, instead of the directory i have specified in the virtual host.

PresFox
Posts: 11
Joined: 2018/05/21 08:55:26

Re: Domain A record on registrar to directory on server?

Post by PresFox » 2018/06/03 19:47:37

NVM, i forgot to add:
IncludeOptional sites-enabled/*.conf

to the apache config. Working now

scottro
Forum Moderator
Posts: 2556
Joined: 2007/09/03 21:18:09
Location: NYC
Contact:

Re: Domain A record on registrar to directory on server?

Post by scottro » 2018/06/03 20:26:30

Thanks for coming back and letting us know how you fixed it. There's a good chance it will help others in the future. I'll mark the thread as solved.
New users should check the FAQ and Read Me First pages

Post Reply