I am trying to create a whitelabel service for my site. I want to do it like dohop does. So I created a sub domain on my main site like : whitelabel.example.com and I want to know what I have to do in order for a user to be able to set a cname on his domain to use my service.
I tried this:
User's domain: userdomain.com
tests.userdomain.com - CNAME - whitelabel.example.com
www.tests.userdomain.com - CNAME - whitelabel.example.com
When I ping tests.userdomain.com I get:
Pinging to whitelabel.example.com
So I guess the CNAME does it's job but I can't figure out what I have to do on my server (example.com) in order to understand and reply to the request.
All I get when i type tests.userdomain.com in my browser is cpanel's default page that informs me of an error.
If you was using PHP for instance you could do:
<?php
$host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'];
$host = str_replace('.example.com','',$host);
echo $host;
?>
Once your CNAME as has setup, you need to use your sub domain into iframe so that when any visitor make a search, they will land to your subdomain which is pointed to dohop affiliate server. Hope this help!
Thanks
Related
is it possible to point my example.com domain to another domain like
example2.com on another server ?
my idea is to point
{variable}.example.com to example2.com/{variable}
like
A.example.com -> someoneElseServer.com/A
B.example.com -> someoneElseServer.com/B
C.example.com -> someoneElseServer.com/C
I own A.example.com but someoneElseServer.com/A is on another server and it's not mine , it's just a service that I need to use it somehow by changing the variable which is {A,B,C} and keep in mind that {A,B,C} are wildcard sub domains and it can be anything
I'm happy to do that on nginx , apache or maybe any other suggestion like domain configuration on the host itself or anything.
note : I need to point domain , not redirect
As I know it's possible to connect domain to another server or domain but I care now about the variable to be in the sub domain
any idea or suggestion to solve that ?
Edit:
I saw this solution
Pointing sub-domain to another domain on another host
but my problem is to make it dynamic subdomain . not static
So I have a domain
1. somedomain.com
2. server ipv4 address
On Google domains I have:
Name TYPE DATA
# A 11.85.258.61
Cloudflare:
TYPE Name Value
A pamperyouanywhereapi.com 11.85.258.61
CNAME www pamperyouanywhereapi.com
But I get the error below When I try to access my app:
This site can’t be reached
This is the correct setup. Make sure you wait out up to 48 hours when doing a new website.
Set up is correct. But I think my tomcat is blocking Cloudflare. I went through this article.
And the commands the author has provided in that article, they did not give me positive results.
Wrong article; but if I recall it was telnet your server's ip address.
I have a server of OVH company and I'm having some problems setting a subdomain for it.
My server configuration is something like this:
Apache service working at port 80 with the website and works only with https (apache config makes a redirection for http request to https).
PostgreSQL service on default port 5432
Gitlab installation working over nginx at port 81.
I'm trying to set the external_url for gitlab to http://git.example.com:81 but when I try to access, i'm being redirected to a OVH default page.
I can access gitlab if I set the external url to something like http://example.com:81 or even if I set a relative path like http://example.com:81/gitlab but I can't make it work with the subdomain http://git.example.com:81
How do you think I can get it working? Maybe I have to change DNS zone or something related to the redirections in the OVH web manager panel??
Thanks in advance! This is a really great community!
(Posted on behalf of the OP).
I just assign in the panel of the web hosting this redirection: git.example.com => example.com and that does the trick.
On my site, each group has a specific URL, eg: domain.com/my-group, domain.com/my-group2 and so on..
What I would like is that the user uses my-group.domain.com, my-group2.domain.com to get to its group.
How can I achieve that?
You can setup Apache to listen on both my-group.domain.com and my-group2.domain.com using the Virtual Host configuration.
Apache's documentation on this topic should be enough to get you started:
https://httpd.apache.org/docs/current/vhosts/
I'm creating an app using Google calendar API. Everything works fine on my local apache install, using localhost:8888/pathtoapp as the redirect URI.
I want to migrate the app to another machine on my local network. I tried changing the URI to the local ip of the new apache install. I get the following error...
Error: invalid_request
Invalid parameter value for redirect_uri: Raw IP addresses not allowed: http://192.168.0.17/pathtoapp/
Any ideas on how I can use an internal IP as a redirect URI or other ways around it?
Thanks.
Looks like the API is not allowing you to use IP addresses. Try to use network name not ip address.
If you don't have access to the name, create an alias on your local machine for that specific IP.
[development environment suitable solution]
Whilst the Google Console will not allow you to have an IP as a redirect URI:
Invalid Redirect: http://10.100.1.1 must end with a public top-level domain (such as .com or .org)
you can create a host name entry which redirect you a valid domain to another the desired IP address:
$ vim /etc/hosts
Append:
10.100.1.1 localhost.com www.localhost.com
Now you can access your site from localhost.com or www.localhost.com and have localhost.com as the redirect URI.
It's not possible...you have to stick in a domain name on a public server for testing...seems stupid to me as well :-P
Duplicate of this:
Can a public IP address be used as Google OAuth redirect URI?
Use localhost:port/redirectpath to test on local machine.
For window OS, this error can be removed by adding host entry in your system so google will think it as coming from the given hostname
Take your global IP address say: 106.200.247.101 (or google what is my IP, you will get it)
go to C:\Windows\System32\drivers\etc\hosts on windows and add a new entry as below
eg:
106.200.247.101 abc.com
Then you will be able to refer to using given hostname