Cpanel - subdomain outside public_html - subdomain

I had two domains on one hosting account, managed by cpanel. During the second domain installation I opted to use root folder outside public_html because the second site was going to have independent ftp administration not related to the one of the first domain at all. So I didn't want the files of the second site to be accessible in public_html.
That worked pretty well until the second domain expired and wasn't going to be renewed. However, despite website isn't public already, I want to have web access on it for testing and other purposes but it seems like cpanel doesn't allow subdomain directories outside public_html.
Is there a way, to achieve that without having to migrate all subdomain files to public_html and thus - making them accessible for the administrators on the main domain (which is undesired)?

One way you can do this is by having two cPanel hosting accounts:
- domain.com
- subdomain.domain.com
In case the hosting accounts are in different servers, you should make an A record subdomain.domain.com pointing to the server that specific hosting account is created.
By doing that, you will have two separated environments, usernames, passwords and databases will be different from each other. The hosting account domain.com won't be able to see the files and manage anything on subdomain.domain.com. The same applies vice-versa.

create folder out side www as for example hello. and in cpanel/subdomains point that such as ../hello in Document Root

Related

How to set up multistore in sub domains in prestashop 1.7

We have domain.com as the main domain with some different apps in it.
We have prestashop.domain.com as a subdomain which is also a subfolder of root folder in the server public_html folder and contains prestashop installation core.
We want to have multiple shops with the help of prestashop multistore in this way:
someshop.domain.com
anothershop.domain.com
Is it even possible?
Because in the documents it says it is possible and it is done automatically by prestashop.
Check this : https://doc.prestashop.com/display/PS17/Setting+a+shop's+URL#space-menu-link-content
But it is not working for me anyway. I have been trying a lot of cpanel stuff.
It only works in this way:
prestashop.domain.com/someshop
prestashop.domain.com/anothershop
in such configuration Prestashop is responsible to route requests to both subdomains with a unique .htaccess placed in root directory and , of course, a unique installation.
So you have to ensure to configure both subdomains document root in cPanel towards the same server physical path where Prestashop resides.
Then, make sure to set the physical URI to "/" for both shops in the multistore configuration, this should do the trick.

About the creation of a subdomain on cPanel

About the creation of a subdomain on cPanel, do you advise me to create the directory inside public_html or outside?
How to decide where?
Create the directory for your subdomains & addon domains outside the Public_html folder is the safest one because its only the solution for the directories got deleted accidentally while updating the primary domain.
Regards,
Sathya.
Please read this carefully
Hi, you can create the subdomain with the public_html directory if you want your main website files to be viewed by the subdomain. But, if you will delete the subdomain, the public_html directory will be deleted. So, using your subdomain in a directory different than public_html is safer.
Secondly, you will need to configure the DNS of the domain if it is not configured automatically, which will result in the subdomain not working.
If in case the subdomain created is not working,
Go to the DNS section of your domain, and create a new CNAME record mostly like this.
Host IP (Points to) TTL
(yoursubdomain with/without domain) # 600
Also, if you have any trouble with cPanel, you should ask about it at https://forums.cpanel.net for more assistance.
Thanks.

How do I add html files to my godaddy domain without using website bulider?

I currently have a trial on my GoDaddy account. I created a tester domain and I'm trying to make my website entirely out of HTML (not with GoDaddy website builder). For some reason, it's only letting me add HTML code in certain places on website builder. How do I add HTML files using cpanel to my domain?
As you mentioned you are only trying to use html files, use any free shared website hosting service provider online (Some googling would work). Sign Up, login to the cpanel you will be prompted by the hosting service provider either by E-Mail or on the dashboard when you login the nameservers which are something like 'ns1.hostingprovider.com'.Login to your godaddy dashboard open your domain settings and update the nameservers with the ones your hosting provider gives you.Log on back to your hosting cpanel navigate to add files(html,css, a Readme file is optional) to your domain and wait Boom, and your files can go live within an hour of updating the nameservers on godaddy but sometimes this might take 24-48 hours.
Note - This process is only to know the general process to host files, if you consider hosting larger applications built in Multiple stacks and environments please check other threads when trying to deploy the application.

Accessing WP admin of a multisite with expired domain

I got a multisite network, and got subsites on it, unfortunately the main domain has expired, and I cannot access my WP admin. I don't worry about the main site but I need to have the subsite.
I am able to access the main site using the IP but not its WP admin. I tried following this but it didn't help. I saw a way via accessing database (this method) but I couldn't access database as its hosted in Digital Ocean, it's pretty hard without a control panel.
want a way to access main sites WP admin
access my subsite via URL (it has a separate domain which is being masked)
If your domain has expired, ordinary DNS will not work. This means that domain-based hosting on the web server will no longer operate as well.
However, you can easily trick your local machine into thinking the domain still exists. This will work on Linux and OS X. You'll need to know the IP address of your web server - if you do not have this, you'll have this in the welcome emails you've received from your web host, or perhaps by logging onto your customer control panel.
Edit your /etc/hosts/ file. In a blank link at the end, add this:
yourdomain.tld 1.2.3.4
where 1.2.3.4 is your IPv4 address. The gap between the two can be any number of spaces or tabs.
Once this file is saved, you should be able to ping it thus, in a console or terminal utility:
ping yourdomain.tld
and it will show you what IP address you have assigned it to.
You can then access it normally. Bear in mind, though, that only you have the DNS information, so it will not work on any other machine. It will however allow you to access your WordPress control panel.

How do I create a subdomain with rackspace?

I have a site I need to create a subdomain for, managed by rackspace cloud.
The domain is already setup and online. I just need to copy the current www.mysite.com to lab.mysite.com.
How do I go about doing this?
Do I add the subdomain in the cloud sites listing, or under the listing for the domain?
And where do I copy the files to? The current site is at /www.mysite.com/web/content on the ftp.
Actually, there is much difference between Rackspace Cloud Sites and Rackspace Cloud Servers, and the ways to manage domains/subdomains are also different.
So, if you have a Cloud Sites account, that should be a part of the control panel.
But if you are on a Cloud Server, it's not the same thing :
Login to your NextGen admin panel choose your server, and open the DNS tab.
Here, you can add a record for your domain sub.domain.com to make it match your server's IP.
Then you'll have to tell Apache there's a new domain to deal with (a virtual host).
As an example, if you are running an Ubuntu Server, that should work something like that.
PS: There's also an official article in the Rackspace Knowledge Center, but i'm not a fan of the proposed solution.
When you login to the control panel at Rackspace, you can add subdomains by creating new sites like you would with a regular site. There's more information in the Cloud Sites Knowledge Base: Creating Sub-domains and/or Domain Aliases