I have a php file named 'db.php' in my folder /Library/WebServer/Documents/ and I can reach it but I have a picture '1.png' in the same folder but I cannot reach it.
Forbidden
You don't have permission to access /1.png on this server.
How come?
Related
Why I got 404 - File Not Found when I run CI.
I am using xampp 8.0.0, I already put my CI folder to htdocs and also I've changed the config/app baseurl to http://localhost/framework-4.0.4/.
When I open it to browswer and click public it just redirected to 404.
enter image description here
You should setup a virtual host in your xampp for your project.
To do that for this codeigniter projects, open the the Apache httpd-vhosts.conf file which are located in C:\xampp\apache\conf\extra\httpd-vhosts.conf, Added below lines of code at the end of the file.
using the example codeigniter-blog.local
DocumentRoot "C:/xampp/htdocs/framework-4.0.4/public"
ServerName codeigniter-blog.local
Now, Open the hosts file which are located at C:\Windows\System32\drivers\etc\hosts, Added below code into this file at the end.
127.0.0.1 codeigniter-blog.local
restart the xampp server.
If you open the browser and navigate http://codeigniter-blog.local, if you are getting welcome page, that means everything fine otherwise you'll get intl package is not enabled.
I have a website template that I uploaded to my ftp server using FileZilla. However when I visit the domain I get the error:
Directory Listing Denied
This Virtual Directory does not allow contents to be listed.
in the console it displays a 403 forbidden error. After researching I recognize that the default web page inside the root directory is not set. All my attempts to set the default page have failed. Here is what I tried:
1) Logged into ftp server with FileZilla. Clicked File > Site Manager > Advanced and set the root directory. The root directory contains a file that says index.html
2) Created a .htaccess file in the root that contains the text "DirectoryIndex index.html"
Solutions involving IIS are welcomed as well.
Any advice on how I can get this fixed?
Unfortunately I did not have permissions to access the actual server files so I contacted the hosting company.
They resolved my issue I believe using the approach #alvits recommended, however they have not returned my request to confirm how they solved it.
Thanks for the support
I have a GoDaddy web hosting account with a cPanel access. I am trying to figure out where should i upload my php files.
I have created a new folder inside the public_html folder as fortnox_invoicing and have copied all the code (PHP/HTML/JS) files in that folder.
But when i try to browse the php files it doesn't work instead i get "ops, this page does not exist" message.
http://example.com/fortnox_invoicing/index.php
Following is how the public_html directory looks like for now:
You can upload your PHP files in public_html if you want to browse your website like:
http://example.com
You can also upload PHP files in subfolder if you wish to browse it like
http://example.com/subfolder
If you are receiving error 404 while browsing subfolder, locate .htaccess file and check if there is any rules that are restricting index.php to load and causing 404 page. If .htaccess file is hidden, you'll have to enable the show hidden file in while opening cPanel File Manager. Try renaming .htaccess file and load your website again. Also make sure that root folder contains index page and it is listed as default page in .htaccess file.
You see this page because your website doesn't have "index.php" or "index.html" file in public_html folder.
for example
-public_html
-index.php
**-subfolder**
-aboutus.php
-contact.php
-service.php
**-subfolder**
-thankyou.php
Most service providers use the above hierarchy.
I'm working on mac 10.6.8 and I've installed xampp and would like to change where the htdocs files are looked for. I have changed the httpd.conf file in the etc folder within xampp
so the lines now read:
DocumentRoot "/WorkArea/folderforhtml"
I've also changed the directory to that folder
Directory "/WorkArea/folderforhtml"
I've put a test.html folder in that file but when I go to my localhost/test.html I'm getting a 403 error. Is there a permission setting I need to change in order to access these files?
I've restarted the server many times as well.
I am using Cyberhost.in to host a JSF application. The problem that I am facing is that whenever I am trying to access image files from public_html folder I am getting a 404 error. I have kept my war file in webapps folder. I am using c-panel, the thing is that I want to take backup of files for my website so I have kept them in public_html folder. Initially I was saving the files under webapps/[WAR FILE NAME] but when ever I was trying to overwrite webapps/[WAR FILE NAME] I was getting permission denied error.
You should upload image files on their location that you have mentioned in your code, otherwise you should change the location in website code of the same.
Also check permissions/ownership of files