im wondering and looking around for a possibility of a wildcard/catch all domain setting. I couldnt find anything online so ...
I basically want every domain that points to my site via an A-Record and which gets requested, to display my htdocs default folder.
At the moment every request for a domain that isnt setup as a webspace gets redirected to the default site. <- Thats not what I want.
Does anybody know a solution for this?
Thanks :)
I have Plesk 11.5.30 with Apache running
Do you mean you want to create wildcard subdomain on your domain ? Please have look at https://kb.plesk.com/en/2239
Related
I've been googling for a bit now, and I really cant seem to figure this out. I recently bought a domain name with google domains, that I wish to point to a sub domain on my web-server, (example) http://120.0.0.0/sub-folder/, while apearing as domain.com.
Right now I have mbektic.com forwarding to http://138.197.5.88/mbektic/ which kind of gets what I need done, but I wish for the URL to say mbektic.com, instead of the ip address of the server.
Now I've been looking around and I've found things mentioning things from creating records to .htaccess files, and honestly I'm completely lost.
If someone could point me to a straightforward guide or give me a list of steps to follow, I can do it myself, but currently I am just lost.
This really belongs on unix.se since it isn't programming...
That said, what you need to do is set up a DNS A record pointing your domain name to your IP address. Add a second one to handle www.example.com
Then, on the webserver, configure it to respond to that name and serve content out of the directory you specify (the apache webserver calls this the DocumentRoot - you may want to look up apache virtual hosts .... )
Ok, i've seen this question posted elsewhere but can't seem to find the correct answer. So like the title says, i've tried to set up a CName entry:
subdomain.siteA.com go to subdomain.siteB.com
It works somewhat. When i ping subdomain.siteA.com, i get the same ipaddress as subdomain.siteB.com. So thats working as expected.
The problem is when you enter the url subdomain.siteA.com in the browser it goes seems to go to the ipaddress, but because its a shared server and there are multiple domains, it doesn't show the correct website. It shows internal error instead. I believe this is because the IP is a shared IP.
So like if i use the ipaddress i could navigate to the correct website by entering something like this: https://192.163.214.xxx/~username/SiteFolder/
or this would work too:
https://subdomain.siteA.com/~username/SiteFolder/
So i'm definitely pointing to the correct server/ip right?
So my question is, how can i make it go to correct site since its a shared ipaddress? is it some sort of dns record i need to add on site b, or a file i need to modify on server, or something i can do whm or cpanel? Or is it just not possible? I feel like there's got to be a way. I have a dedicated server just fyi.
Thank you all ahead of time. I'm no expert for sure, so i truly appreciate everyone's advice.
As you have added a cNAME record "subdomain.siteB.com" for the site "subdomain.siteA.com", it will redirect the requests for the site subdomain.siteA.com to to the site subdomain.siteB.com. In your case,please check if the site http://subdomain.siteB.com is accessible and working properly.
I am currently working on a CMS type of site where users can create websites on my server.
I want to be able to create subdomains for the user's website for them to see the preview.
The next step would be for users to be able to point their domain name to my server, and when users go to the domain it would go to their own designated folder on my server.
How would I go about doing this automatically with php, I have been looking for solutions with no avail.
I currently have a Virtual Server with hostgator. Please advise, or point me in the right direction. Any solutions are welcome as well, I am pretty much stuck at this point.
Thank you very much.
EDIT
For example, if my domain is www.mydomain.com, when a user makes an account, the subdomain username.mydomain.com is created. Later down the line, if the user buys the domain name www.userdomain.com, I want to make it so that if www.userdomain.com is entered, it shows what is on www.mydomain.com/userdomain. The URL should still show www.userdomain.com
The answer is depends on which web server you are using ?(apache / nginx or any other)
You need to have separate directory for each sub domain you created
In your virtual host configuration you need to match the host name and get the subdomain as a parameter to set the root directory for your host name.
CNAME is also possible but if you can tell your web server there is a possibility for detailed answer.
I have a little DNS Spoofing / Blocking system I setup for work. It simply uses a blacklist to spoof the dns records and simply points them to a BLOCK / DENY page.
If I go to the URL directly for instance http://www.redtube.com the system works as expected and displays my index.html and what it should
The problem arises if I go to http://www.redtube.com/video?/43 or anything other than the full domain I get a not found.
I need to to configure Apache so that it drops all the junk after the TLD and simply displays my page such as http://blocked.project.com
Another way to look at it would be to say redirect to index.html if the url entered is not known to the webserver.
Any help greatly appreciated.
Used an apache FallbackResource to achieve exactly what I was after. Had to make sure my image paths on the website were absolute but works a treat.
http://httpd.apache.org/docs/2.2/mod/mod_dir.html#fallbackresource
I'm a complete newbie when it comes to servers, so I need some help. Basically, I want to have a subdomain on my VPS. I'm not too concerned where the files reside, though of course I would like them separated if possible.
I found a guide to doing this that basically sums the procedure up in five steps:
Create directories to host the content of a new virtual site.
Make a copy of the /etc/apache2/sites-available/defaults file with a site appropriate name.
Change the two /var/www/ entries to the actual directory of the new site.
Add the ServerName line with the real domain name you will be hosting.
Use a2ensite to enable the new site, and finally reload Apache2 so it knows about the new site
I tried all of this, but I can't get it to work. I didn't get any errors at any point during this process, but when I enter the address with the subdomain into my browser, I get a "Server not found" error.
The company that hosts my VPS has an admin page where I can set up subdomains. Stupid question: do I have to do reconfigure the DNS records or something while doing this, or is it likely that the problem is caused by something else?
Additional note: I followed a guide on howtoforge.com when setting up the server, which in hindsight may not have been the brightest move on my part. It is possible that I made a mistake there that is somehow affecting me now?
Assuming you've setup the subdomain correctly in your VPS' admin page, the only thing left to check here is that you've actually created the subdomain in your DNS administration page (have you?). For example, I use afraid.org to manage my DNS records and to add a subdomain, it's essentially:
Type: A
Subdomain: sparky
Domain: example.com
Destination: 120.34.2.3 (this would be your VPS' IP address)
In general, you add a (sub)domain by:
sparky.example.com A 120.34.2.3
Please keep in mind that you want to add an A record (this is important!).