M
M
marshadow2020-08-14 23:07:42
PHP
marshadow, 2020-08-14 23:07:42

How to automatically add domains in openserver php apache?

I have such a problem - I'm making a website with a link shortener + IP logger and finding the exact geolocation, I want everyone to be able to add their free domains (.tk, .ml...), I ran into a problem that I need to add each domain to aliases in openserver, but did not understand how to implement it. Then I thought that I need to create folders with the name of the domain in the "domains" folder via php, but then a person suggested to me that then it would be very easy to put the site. How to implement this? (so that each person can add his own domain) I suppose that you need to take the "host" header from the HTTP request headers in order to give some result from it, but if you simply specify an 'A' record in the domain with the value of the dedic IP on which is openserver, and go through the domain, then openserver will write that you need to specify an alias in openserver.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alekssamos, 2020-08-15
@alekssamos

X:\OpenServer\userdata\profiles\Default_aliases.txt
Read it and add new lines in the same format.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question