I have website on one host(host A) and another website which I include with iframe(on host B).
From that iframe I would like to go to one of my pages from my host A, but I get this error
You don't have permission to access
/pages/online.php on this server.
Additionally, a 404 Not Found error
was encountered while trying to use an
ErrorDocument to handle the request.
How can I fix that? It worked good when I was using another server.
Apache error logs:
[Fri Jul 01 03:24:37 2011] [error] [client some-ip-here] File does not exist: /home/etcorg/public_html/proba/500.shtml, referer: proba.etc.org.rs/pages [Fri Jul 01 03:24:37 2011] [error] [client x.x.x.x] SoftException in Application.cpp:256: File "/home/etcorg/public_html/proba/pages/online.php" is writeable by group, referer: somepage.com
I think your host has program that checks that the permissions aren't set too high (over 644). Thus the error. Change all the rights to 644 for files and 755 for directories.
Check the reading rights on this file on the server for Apache user.
Try to use full URL in your iframe (ex: http://www.SiteB.com/pages/online.php)
The error
You don't have permission to access /pages/online.php on this server.
Additionally, a 404 Not Found error was encountered while trying to
use an ErrorDocument to handle the request.
means that location /pages/online.php could not be accessed because of lacking permissions. If the file is supposed to be a PHP script, it should be readable (but highly probably not writable) by the web server process.
In addition, the server tried to use custom error page for the HTTP 500 internal server error situation but the server was incorrectly configured and displaying the custom error page failed as a result. (Error message hints about ErrorDocument configuration directive which makes this server almost certainly an Apache server.)
To fix the first error, you may need to change access bits for the script and to fix the second error, you must check where Apache ErrorDocument configuration points to. Perhaps there's a typo in the configuration or some file is missing?
Related
I just recently changed to Digital Ocean to have full Shell access and stuff to advance my knowledge of code. I made a script and removed .php from url's to make them look nicer in the url bar and as well i have had to create a ".php" file so i can re-route users to the login.php page. Since i have created the .php file i keep getting a 403 error. Access Denied. Its the same error that shows up when you place "Deny from all" in a .htaccess to block traffic from viewing a includes folder or etc. The error i get in the error log is:
[Fri Jun 30 00:42:21.056280 2017] [authz_core:error] [pid 2808]
[client 76.111.178.215:50805] AH01630: client denied by server
configuration: /var/www/affattraction.com/public_html/login/admin/.php
If anyone has encountered this or knows how i can give permission to access the page ".php" it will be greatly appreciated! This worked on my old cPanel.
Thanks!
Well I have been having a tough time trying to figure out the reason for getting the forbidden error message on my wamp server.
I have a folder website_ink inside c:/wamp/www/ folder. when I access
http://localhost/website_ink/
the index page loads fine. But when i try to access any other page it gives me a forbidden error message.
The url i tried accessing was http://localhost/website_ink/cloud-plans.
This page does exist inside my root directory meaning inside website-ink/cloud-plans.php page does exist.
This is the error I find when visiting the url on browser
Forbidden
You don't have permission to access /website_ink/C:/wamp/www//website_ink/cloud-plans.php on this server.
Apache/2.4.9 (Win32) PHP/5.5.12 Server at localhost Port 80
This is the error message i found in the log file
The given path is misformatted or contained invalid characters: [client 127.0.0.1:60811] AH00127: Cannot map GET /website_ink/cloud-plans HTTP/1.1 to file.
I do not have any virtual hosts setup or anything fancy. Also I tried upgrading from Apache 2.2 to Apache 2.4. Currently I am using Apache 2.4.
Please help
The reason why it happens is you try to open "/website_ink/cloud-plans" instead "/website_ink/cloud-plans.php".
In case you want to use path wiht out file extension you need add rewrite rule to .htaccess or httpd.conf:
RewriteEngine on
RewriteRule ^/(website_ink/.*)/$ /$1.php [L,QSA]
Also you need mod_rewrite to be installed and enabled
https://coinsafe.io/
I recently purchased and applied an SSL certificate.
After getting it all set-up, when I go to the site it downloads the index.php file...
There is code in the file but I cleared it out to see if it was my code causing it, and it downloaded it again and it was empty as expected.
The weird thing is when it downloads, it's not a .php file and it's called "download"
How can I fix this?
Edit
I am now getting this error [Sat Nov 16 04:09:07 2013] [warn] NameVirtualHost *:80 has no VirtualHosts
when I try to start Apache.
Basically, if Apache is trying to send a PHP file to your visitor, it means that Apache doesn't realise that the PHP is a script file.
This in turn means that apache hasn't loaded the php module, even if it's installed.
If you've done nothing else, there should be some sort of hint in your apache error.log, usually located in /var/log/apache2/ on ubuntu.
Also, in ubuntu php, you should have sym-links to php.conf and .load in /etc/apache2/mods-enabled/
I am trying to set up my website on VPS (Virtual Private Server). When I browse a static file like abc.html it works well. However when I try to browse a file that has database connection I get 500 error: The request was not completed. The server met an unexpected condition.
So I thought my mysql credentials would be wrong. But they seem to be correct. When I go into CPanel and check the logs I find this:
[Sat Jun 02 08:19:26 2012] [error] [client XXX.XXX.XXX.XXX] File does not exist: /home/abv/public_html/abv/Connections/sys_cpanel, referer: http://XXX.XXX.XXX.XXX/~abv/abv/Connections/PowerCMSConnection.php
Googling it suggests that I have something wrong in my .htaccess file. But if it would have been wrong then why would the files that don't use database connection work?
Anyways, this is my .htaccess file:
##########################################
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.*)\$ $1.html [nc]
Redirect 301 /business.html http://www.something.com/corporate-production-video
Redirect 301 /events.html http://www.something.com/london-videography
Redirect 301 /property.html http://www.something.com/property-on-video
Redirect 301 /weddings.html http://www.something.com/weddings-videographer
Redirect 301 /contact_us.html http://www.something.com/production-companies-music-video
Can somebody suggest what the error can be?
If your browser support Private Browsing (Fifefox, Incognito for Google Chrome and InPrivate for Internet Explorer), try opening the site after initializing such private browsing mode.
A while ago when I was configuring my webserver for redirects, it turned out that the browser saved the first redirect setting (301 means permanent redirection), and even though I altered the configuration and rebooted the server, my browser was using the same, bad, locally cached data. The issue for me was cleared after checking in private browsing mode.
when I use .htaccess file inside a folder named admin with the following code
AuthName "Alertme"
AuthType Basic
AuthUserFile /mobs/.htpasswd
require valid-user
and .htpasswd file with following code
rajasekar:66Acdia7gE1to
While accessing the file inside folder, it gives server error, The server encountered an internal error and was unable to complete your request
why is this happening. help me
Most likely your Apache config does now allow Auth* directives in .htaccess in that directory and/or location. You can check for sure why looking in the error_log for that host. There'll be a line that looks like:
[Wed Dec 02 22:13:14 2009] [alert] [client x.x.x.x] /path/leading/to/.htaccess: AuthName not allowed here
This error will show up as a "500 Internal Server" error for any client attempting to access that particular server/directory.
You will need to add an "AllowOverride AuthConfig" so Apache will accept the Auth directives in the .htaccess. Details are here in the Apache docs.
Make sure that /mobs/.htpasswd is absolute (not relative to your webroot) path on your filesystem
This usually happens when your htaccess and/or htpasswd file can't be read by apache. Either because the user apache is running under doesn't have the needed rights on these files.