403 - Forbidden: Access is denied. Getting my site to display - web

I am trying to change the content of my site (it is a help site and I have gone from using one software package to another for creating it) and usually, I would just make sure that the content was in the root folder and all is good.
The issue is that when I change the content I get a 404 error, so I did some googling and put some code in the web.config file and now I get a 403 error! Then I tried everything I could and still get the 403.
If I change the content in the root folder back to the original, there is no problem and on another site I have, I can just add a folder then navigate to www.site.com/newfolder and it works fine.

Related

Login form request return error 403 on laravel 7

i just created a new laravel project install the authentication package like i usually does, but when i tried to access login, it return error 403 and said :
"Access forbidden!
You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.
If you think this is a server error, please contact the webmaster."
the register is working fine and all other pages that i create are fine too, just the login that has error when i tried to access the login form. i dont understand whats wrong because i did the instalation just like usual and it worked on the last project a week ago
i'm using apache
i solved it, turns out my partner create a folder name "login" inside public for css folder. i just need to rename it and it work now. i hope this can be a lesson to everyone

creating an error page-404

I've registered my friends website and created it from names.co.uk, the website is (http://www.boillixbaits.co.uk)
I have followed their instructions from their support page as this is my first time trying to create an error page (http://www.names.co.uk/support/hosting/support_centre/linux_hosting/1255-how_to_add_custom_404_error_pages.html)
I followed every step exactly but for some reason this didn't work? Has anyone got any friendly advice or better still what I need to do to make an error-page work when the wrong address is typed in?
Many thanks in advance :)
What you want to do is go to the root of your site (the "public_html" folder, or the "www" folder, in your FTP program. Then you want to make a file called ".htaccess". Not "something.htaccess" or "custom.htaccess", just ".htaccess". In that file, you want to put:
ErrorDocument 404 /404.html
the "/404.html" should be an absolute path to your 404 file. So if your 404 file was in "public_html/files/custom404.html", you would put "/files/custom404.html"

Umbraco throwing 404

I have an umbraco 4 site that I have put a google sitemap onto. This all works fine locally but on the live server I am getting an IIS 404 error (not the umbraco 404 error) - see this link.
However if I preview the node it works fine
I have googled why I would get a 404 and so far I have come up with the following causes which I have checked and can rule out as the cause:
the template is not assigned
there are multiple nodes with the same url
Would anyone know what is causing this problem or how I could fix it?
Update
I have deleted the preview node now as I recreated the node in a different place and it worked. Would still like any thoughts on why I would get a 404 though, just in case a similar thing happens in future
Unfortunately both your links are going to the IIS error page as well as all the other errors on the site so we cant tell what you sitemap should be, see this link for tips on how to set up the 404 page http://www.simonantony.net/knowledge-base/articles/how-to-setup-a-404-error-page-on-your-umbraco-site/ .
Make sure that's working across the whole site then with you Google site map is it an XML sitemap or HTML sitemap and how have you implemented it did you use a package or made it you self.

Problems with .pdf-files in Joomla 1.6

I've installed a Joomla 1.6 template, and everything is working fine except 1 thing.
I have uploaded some .pdf-files somewhere in the file system and people who visit the site can view or download these pdf-files, but when I click on the link or trying to right-click and "Save as target" I get an error message like this:
Forbidden
You don't have permission to access
/path/filename.pdf on this server.
Additionally, a 404 Not Found error was encountered while trying to
use an ErrorDocument to handle the request. Apache mod_fcgid/2.3.6
mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server
at website Port 80
I've logged in as administrator and checked if I found anything that denies access to files with .pdf extension, but all I found was that it seems like a .htaccess-file is being created in the same folder as the .pdf-files just after I'm trying to open them in my browser.
The content of the .htaccess file that is being created is this:
deny from all
I have also tried to edit this files content to "allow from all", and tried to delete it too, but Joomla is just changing it back.
Anyone know why or what that prevents me from viewing or downloading the pdf-files?
If it's a UNIX/Linux server you can FTP in with a client that shows permissions like FileZilla. It's probably the permissions associated with the parent folder cascading down to these files. Try to see if you can upload an image to the images folder and if you can save it the same way you're trying to save the PDFs. If downloading the image to your machine works, I would then look at the permissions settings. If you're not sure which permissions to look for, check out this: http://www.tuxfiles.org/linuxhelp/filepermissions.html
Usually a client can download/view files with permissions of 644 or higher.

IIS 404 Custom Error: URL return response code 200 instead

I'm trying to return a custom 404 page using IIS6. (I have a site that is mostly .shtml pages built using movable type). I have tried it 2 ways:
1) set the 404 error handler in IIS to be type "file" with the path \404.html. This works, but it also means that I can't import the header and footer of my site (hence the .shtml) Trying to point the 404 error handler to 404.shtml results in the default 404 page...i guess IIS can't process shtml files in the 404.
2) set the type to "URL". This works great, except that the response code is no longer 404! Its a 200.
How can I get IIS to respond with a 404 response code with the content of my 404.shtml file?
Given that it's IIS, adding
<% Response.Status = "404 Not Found" %>
to the top of 404.shtml should change the response code to 404.
I am not on a windows machine so I am unable to test it at the moment to verify.
Update:
I was finally able to run a few tests on a IIS 6. As you mentioned in a comment to my post, an .shtml file does not allow script commands to run. So there are at least two ways to work around this:
Instead of naming your custom 404 handling page 404.shtml, name it 404.asp. The user should never see the actual name of the page so it shouldn't cause any issues. Note that "Active Server Pages" must be set to 'Allowed' in the Web Service Extensions folder of IIS.
Modify the page extension mapping for .shtml to use asp.dll instead of ssinc.dll. You can do this from IIS by selecting the website and viewing Properties -> Home Directory tab -> Configuration -> Mappings tab. Note that this is far from an ideal solution because now all your .shtml files will be processed by asp.dll. This could cause your pages to render more slowly (assuming asp.dll processes files more slowly than ssinc.dll due to greater complexity) and violates the principle of least privilege.
If neither of the options fit your situation, then it may still be possible but the solution isn't immediately obvious to me.
In IIS Manager, open the Properties of your Web site (or virtual dir) and go to the Custom Errors tab. There you can set which file is sent in case of each error code, including 404.

Resources