Change from domain.com/project TO project.domain.com - cpanel

I have created a subdomain 'project' within my domain through cpanel. Now, domain.com/project works fine. But I want the following:
project.domain.com
Do I need to do some activities in WHM login for achieving the same?
Thanks!

Related

Can I direct a cpanel folder to a domain name hosted with a different registrar?

I'm wondering if this is possible and I'm not sure that it is. Before I explain, I found one other post [here]: Separate Domain Registrar and Host, possible to use CDN? which sounds similar to my problem, but I specifically don't want to point the Name Servers away. I only mention this because my question is going to sound very similar.
So I'm trying to help a friend who has a Domain Name registered on Site A (let's assume it's a place like Wix). He also has a hosting package on Site B (to have cpanel access for a site he had built with HTML & PHP).
for example:
1. www.yourdomain.com is hosted on Wix with a template website
2. "database" is a cpanel folder on Site B
Is there a way to have www.yourdomain.com/database link to the "database" folder on Site B's hosting -- without changing the Name Servers?
I don’t believe you can point a directory to a completely different server or hosting package.
However creating a sub domain instead could be your answer.
Is there anything stopping you from using database.yourdomain.com and creating an A record for this in your domain registrar and point it to the hosting package of database?

Allow my users to point their subdomains to my server with CNAME, without having to use add-on domain in cpanel

So I have a service that allows my user to map their own subdomains to my server. For example
http://sub.userdomain.com will map to http://sub.mydomain.com
Now I know that the user must add a CNAME record that points to my subdomain, but using Apache & Cpanel, now I have to add an add-on domain for this connection to work.
Is there a workaround so that I don't have to set up this add-on domain for the connection to automatically connect? (Basically so that my user can point their CNAME to my subdomain and it then automagically works without me having to do manual input).
Hope that makes sense!
No, You need to add addon domain on your server so that cPanel will create entry in apache configuration to work that domain.

How do I give SSH access to users for particular subdomains in cPanel

I am currently setting up a dev environment with multiple subdomains dom1.domain.net, dom2.domain.net, dom3.domain.net etc. and I would like to give different users SSH access to the individual subdomain directories in the file system. Some instances may allow more than one user access to the subdomain directory and some instances may allow one user to have access to multiple subdomain directories.
So, the question is: Is there a way for me to give multiple cPanel users SSH access per subdomain dir?
I tried to add a 'subdomain' account through WHM's 'Create account' but as expected it failed since the base domain already exists on the same server.
Anyone have any ideas? Point me in the right direction?
EDIT:
The reason for this setup is that I want to setup git for different subdomain enviroments and want to give users access only to the server projects directories they are concerned with.
If you have access to WHM you could just create individual cPanel accounts for each subdomains.
If you give access via SSH to a cpanel user, that user will have access to the main domain setup on the cPanel account and on all the subdomains created in that account. So in the end if you will have a cPanel user that can access 1-5-10 or whatever is the total of subdomains.
You can create multiple FTP accounts and associate them with subdomains but you won't be able to login via SSH with a FTP account.

Point domain name to specific folder on server

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.

Plesk 11 DOMAIN Catch All - Wildcard

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