To Change This Page Upload Your Website Into the Public_html Directory Help

Your website defines the personality of your online concern. Many website owners crave a lot of customization, features and tweaks to become their desired site.

In our part as Outsourced Tech Support services for spider web hosts, account related problems or requests are i mutual category of tasks that we handle.

cPanel root directory aka Document root – Why do you need to modify information technology?

Certificate root aka cPanel root directory is the default directory in which your website files are stored. These files show up when you access the site via browser.

When you create a domain in your cPanel/WHM server, the certificate root for that domain would be '/home/user/public_html' directory by default.

While this is usually fine for most website owners, during certain special scenarios, they may need to change this folder to some other directory.

These include installing some tertiary political party applications which take custom data folders, configuring URL shorteners, testing different sets of applications or configurations for your site.

cPanel – change root directory in these 4 ways

There are 4 means to modify cPanel root directory and the pick we cull varies based on the website's requirement.

one. Using Addon domains

cPanel offers a feature for website owners to create 'Addon domains' from their control panel. Addon domain is a domain that points to a subfolder in the main domain.

Addon domains are configured for customers who prefer to create multiple domains within a unmarried account. They look like independent domains to visitors.

The certificate root for a domain depends on the type of a domain. For main domain, it is '/home/user/public_html' and for addon domain, information technology is  '/home/user/public_html/sub-folder'.

But cPanel offers a characteristic where website owners tin can modify the default document root for addon domain during creation or after creating it from the cPanel.

Change root directory during Addon domain cosmos

To change the root directory of Addon domain, in the cPanel -> "Domains" section, click the Addon Domain and update the new document root in the popup window.

Change cPanel root directory of Addon domain

ii. Creating symlinks

At times, y'all may already have another directory which you demand to set as your document root. This is usually applicable while testing a new site.

To change cPanel root directory in such cases, we backup the current public_html and then create a symbolic link from the desired directory to public_html.

The folder permissions and ownership and related links in pages have to be properly configured in such scenarios, for the site to work fine after the change.

3. Setting redirects

A unremarkably used technique for irresolute cPanel root directory is to set redirects from the public_html to the desired folder which contains the files to be displayed.

Setting redirects also assist to avoid duplication, specially if the aforementioned content has to be shown in different sites or subdomains.

The redirection is set past calculation a '.htaccess' in the binder to be redirected and then adding appropriate rewrite URL rules to point to the desired directory.

4. Updating cPanel files

cPanel/WHM does not have an option to change the document root of the chief domain via any interface. By default it is the public_html folder in the user abode directory.

In sure rare scenarios, nosotros have customers who desire their document root to exist changed to some other folder than public_html.

This has to exist washed from the backend by updating the cPanel user account file at /var/cpanel/userdata/username/domainname .

The following parameters are updated with the desired directories.

          documentroot: /home/steinknu/public_html                     scriptalias:                       -                         path: /abode/steinknu/public_html/cgi-bin/        

For sites with SSL installed, the configuration file for SSL is besides updated accordingly.

This file is available at the location /var/cpanel/userdata/username/domain_SSL .

After making the changes, the user data cache is updated and Apache configuration file is rebuilt to reflect the changes in the corresponding files.

The Apache and PHP-FPM services are restarted and we verify the relevant configuration files to ensure that they are all updated properly.

Conclusion

Account customization and feature updates are common requests that come up from customers of cPanel/WHM server owners. Today we saw how our Back up Engineers aid website owners alter cPanel root directory.

Forbid YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us assist y'all.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

See SERVER ADMIN PLANS

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

griffinhatiere.blogspot.com

Source: https://bobcares.com/blog/cpanel-change-root-directory/

0 Response to "To Change This Page Upload Your Website Into the Public_html Directory Help"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel