Folder's in public_html are not getting accessed - cpanel

I have a problem in accessing folders inside the public_html directory. When I create a folder inside public_html and try to access it through browser as www.website_name.com/folder_name I am not able to do so.

Your website_name.com domain should be pointed to 'public_html/' (document directory) , Then you can access the folders like that you mentioned 'www.website_name.com/folder_name'
step 1: click on -> "addon domain"
step 2: then you can see a table like this ->
Addon Domains|Document Root| Username | Redirects to|Actions
step 3: in that table you can see your website entry
change the second column "Document root" to "public_html/" if your website files kept in the "public_html". if the domain document root is pointed to the "public_html" you can access the files like this -> "www.website_name.com/folder"
if your website document root is pointed like "public_html/mysite/" - > then you can get the subfolders of "mysite" folder

Related

Redirect a specific folder to a virtual folder using .Htaccess (make it look like a subdomain)

So here's my directory structure:
|--public_html Dir
|--index.php File
|--search.php File
|----assets/ Dir
|----acp/ Dir
|------assets/ Dir
What I need is a .htaccess way of doing the following:
Redirect http://example.com/ --> http://club.example.com/ (Where club
is not a sub directory, it doesn't exist on the server)
Redirect all pages the same way: e.g. http://club.example.com/search.php
Redirect the /acp/ directory and it's files like this: http://club.example.com/acp/post.php
Redirect the /public_html/assets/ directory too but my javascript files, css files and images are there. I should be able to access them like this: http://club.example.com/assets/theme/reset.css , etc.
The same goes for /acp/assets/ directory. It contains the styling and scripting for the admin page so I need to access files inside it like this: http://club.example.com/acp/assets/scripts/menu.js

How to point two domains to the same root directory in order to run multiple drupal sites

I am trying to point two domains to the same root directory. They both shared the same nameserver and ip address. Now I created a file:
vhost.conf
I put this file in the http://firstdomain.com conf folder
The file has one line of code:
DocumentRoot /var/www/vhosts/seconddomain.com
The firstdoman.com is still not picking up the new root folder. And I do have two directories inside the /sites directory that are name after the two domains that both have a files and a settings.php file. And the default directory has not been modified.
I made a YouTube Video that answers my question:
http://www.youtube.com/watch?list=PL_aBy6EQRuXrysPXkkthzWVmkCBc0x2f9&feature=player_detailpage&v=LWxrC5vivAM

403 Permission Denied

1) We have some code that works fine on our local web server, as per:
http:// localhost/project1/start.htm
2) This code is all inside the folder project1. We have moved this whole folder to the root of our domain via Filezilla, so we now have: www.mydomain.com/project1
3) Here's the file structure:
project1 (main folder) --> start.htm
project1 (main folder) --> Player1 (sub-folder) --> class.htm
4) When I type in the URL: http:// www.mydomain.com/project1/start.htm
It works fine and brings up the hyperlink "start the course"
5) When I click on "start the course" I get:
403 Permission Denied
You do not have permission for this request
/project1/Player1/class.htm
I read somewhere that I might have to give privileges to an .htaccess file but I'm not sure if this is the problem or how to proceed.
try chmod 755 for Player1 and files/folders under it..

install wordpress in subfolder but accessible from maindomain with working subfolders

I want to install a new wordpress instance in a subfolder but make it accessible via my maindomain like www.example.com but its stored in www.example.com/wp/. Thats not a big thing to redirect all traffic to this subfolder, but I want to have all other subfolders to be accessible too. And this where I'm stuck at the moment.
Here is a example of what i mean:
Domaincall -> Folder on the server
Wordpress:
www.example.com -> www.example.com/wp/
Wordpress Subfolders:
www.example.com/wp-includes/ -> www.example.com/wp/wp-includes/
Other Subfolders on my Domain:
www.example.com/otherfolder/ -> www.example.com/otherfolder/
www.example.com/otherfolder/asd/ -> www.example.com/otherfolder/asd/
www.example.com/testfolder/ -> www.example.com/testfolder/
I hope you understand my problem, i just want to have a clean root folder on my ftp.
Yes its possible to install as you need.
Please check the detailed instructions # http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

.htaccess Redirect request to files exts in particular folder only

How do you write rules to redirect all requests to *.php and *.html files in upload/ folder to a text file name forbidden.txt in root www folder. What I'm trying to do exactly is preventing script execution in this dir by redirecting those requests to the text file
Note: The upload/ folder is accessibly by ftp used by a group of people to upload files so I cannot place htaccess inside this folder.
Create an .htaccess file at the root level of your site containing
RedirectMatch ^/upload/.+(html|php)$ http://www.yoursite.com/forbidden.txt
You could also try switching off the PHP engine in that directory by creating an .htaccess file in /upload/ containing:
php_value engine off
although you would need to ensure that people cannot upload files with the name .htaccess
Put your htaccess rules in httpd.conf instead.
If you can't edit httpd.conf, then your best bet is to not allow web access to that directory at all. Let FTP users access a folder outside of your web directory and then provide a mechanism for retrieving the file contents.
You could name that directory "upload". Then you could have your .htaccess file make requests to /upload/myfile execute upload.php, which finds ../upload/myfile and spits backs its contents. This way it would appear to users that they are accessing the "upload" folder directly, but you would the level of control you want through the PHP script.