How to access cpanel hosted PHP file - php

I have uploaded my .php files into cPanel. lets say my main domain is abcde.com. Then I created a subdomain called gisWeb.
Now in file manager under /home/abcdec I can see a directory called gisWeb.abcde.com. I uploaded an index.html file into this directory and tried to run it by browsing http://gisWeb.abcde.com/index.htmlbut I'm getting site cant reach page. `
We can’t reach this page.
Try this
Make sure that you’ve got the right web address:`
How can I access my files.What should be the url?
Please help me.
Thanks

Problem could be one of these.
1. Sub-Domain you created may not have propagated.
2. You may need to put the files in public_html folder inside gisWeb.abcde.com

Related

Do you know why I can't access my php file on my browser but can access the folders?

I have a php project and I can't acess my file when I go in my browser: http://localhost/www/main/index.php.
However, when I go to http://localhost, it displays all my folders of my project.
For information, I'm using LAMP.
The error is just that it can't find the url http://localhost/www/main/index.php
Here is the folder structure of my app :
Could you help me please ?
However, when I go on http://localhost, it displays all my folders of my project.
As per your picture, the URL of the folder which displays all these subfolders of your project is actually http://localhost/VetDev.info, not http://localhost.
Therefore
http://localhost/VetDev.info/www/main/index.php
is the correct URL to your index file.

Web Folder is accessible on local host but not found on web server

I was working on my site in php using xampp server. everything was going fine and great. i created the pages styled with css, functionalized with javascript and stored data with mysql. everything gone fine. when i decided to upload it to web server it didn't work well. on the very first page it didn't load css.
In the root directory i have only three files index.php, log-in.php and connect.php. css, js and every other files and folders are located in dashboard folder in root directory.
when i access website it shows the root index.php with no css because css files are in dashboard/ and when i access domain.com/dashboard it says
Not Found
The requested URL was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle
the request.
I changed the files and folders permission on cpanel but that didn't work either.
This is directory structure
root index file
dashboard not accessible
should look like this
I hope somebody has explanation to this problem that why it is occurring and what is the solution.
Thank You...

Website hosted on 1and1 only display index.php

I recently suscribed to a 1and1 hosting contract. I've been having issues to display my website, so I tried to put some very basic pages online in order to tell wether the issue was in my file or on the server side.
The homepage is named index.php and has a link to another page (page1.html) that is supposed to display a "Hello World".`
Clique
The homepage is online but there are some issues.
The homepage only works when it's called index.php and doesn't work when it's called index.html.
When I click on "Clique", the url changes to mywebsite.com/page1.html but the content is still "Clique" while it should be "Hello World".Also, the CSS file isn't read.
I've read a lot of threads dealing with similar issues and apparently it might be a problem with the .htaccess file. I don't have a .htaccess in the folder where my files are and I don't know much about how it works. Also, the CHMOD is 705 for both files.
Maybe try the 1and1 support for this issue.
I don't think this is the right place to ask.
Do you have root access, or just FTP.
If there is no .htpasswd, try uploading one.
A generator which will help you is just one google away.

How to set a custom Index.html in CPANEL?

I just wanna ask something.
I am using cuccfree.com for my free webhosting and Vista Panel for my CPanel.
in my CPANEL i have a folder named districtfive.cu.cc and it contains all of my files.
When Im trying to browse my link it always shows a list of Folders and Files of Index of.
My question is that how can I prevent to show all of that folders and instead show my website? I mean if i browse districtfive.cu.cc it will automatically open my Admin.php.
Does it have to do with:
Index Manager(My CPanel doesnt have that)
.htaccess(I dont know how to use it but i try but still noting happens.)
any suggestions or answer is highly appreciated. TY
Create an .htaccess file. Inside of this:
DirectoryIndex Admin.php index.php index.html
Seems like you're not using the default index.php. Also, any reason you're not using the default index.php nomenclature most people have come to expect?
Rename admin.php as index.php. It will automatically open your site with url 'districtfive.cu.cc'.

Redirect users to a subdomain with new using cpanel and keep original URL on user's browser

I have a php account with my provider, and I also have cpanel installed for me.
I currently have two drupal sites there, let's called the main myMainSite and another one under construction called myNewSite.
So when I go to www.myMainSite.com, I go to the main site. When I go to myNewSite.myMainSite.com, i go to the drupal site that is under construction.
My question is, when my under construction site goes live, I want that all users that go to www.myMainSite.com see the new site (the one that is under myNewSite.myMainSite.com).
How can I accomplish this with cpanel? is it within the "addon domains" configuration?
I don't want a redirect that changes the address bar, ie, I want to keep the original url.
You would just change the DocumentRoot of www.mainsite.com to point to the same DocumentRoot as myNewSite.myMainSite.com.
I assume you've used cPanel's subdomain control panel to add myNewSite.myMainSite.com. And I'll assume myMainSite.com is in the /public_html/ folder. Therefore the new site (and site with a subdomain) will be at /public_html/myNewSite.myMainSite.com
Why can't you just use File Manager (or FTP) to move all the files in /public_html/ to /public_html/OLDsite?
Then move everything from /public_html/myNewSite.myMainSite into the /public_html/ folder.
Then check your site is working with the new files.
Maybe you could also send a support ticket to your host to see if there's another way. It could be as simple as them changing something in Apache's conf file for the myNewSite.myMainSite.com subdomain.
I'd also think you'd need to change the settings in Drupal (when you've changed domain) so Drupal knows the new domain name too.
I recommend you to have main 2 user accounts call oldlive and newlive.
you may have domain like
oldlive.myMainSite.com and newlive.myMainSite.com
Then you can add Park Domain myMainSite.com to oldlive.myMainSite.com when you not ready.
Once you are completed new site which currently in newlive.myMainSite.com, you will remove park domain from oldlive.myMainSite.com and move to newlive.myMainSite.com.
then you can transfer domain smoothly.
You can use "Redirects" option in cPanel to redirect all visitors from old to new site.
Or you can simply change Virtualhost in Apache for your main domain to directory of your finished (currently under construction site).
Agree with the previous answer. If you would like to load the sub-domain's contents on the main site then you will need to move the data from sub-domain's directory to root directory that is public_html.
Just make sure, you do not have any live site on your main domain, If your main domain has the working site for it and you will upload the contents under the root directory then your website won't work due to conflict in contents.
If it's not possible then you will need to upload the contents under one sub-directory in public_html and after that you can access the site by yourP_website_name/directory name.
Once you will done with the moving contents then you will need to update the base UR Lto the new site URL.It is present in cPanel >> File Manager >> public_html >> Sites/Default/Settings.php

Categories