Asked by rwniceing
at 2024-08-29 23:49:18
Point:500 Replies:10 POST_ID:829203USER_ID:12079
Topic:
Linux;;Apache Web Server
I have two questions for my apache Centos6 VPS server with root access, please advise
Question-1
I try to setup my own error.html for 404. But when include or NOT-include "ErrorDocument 404 /error.html" in my .htaccess file, whatever both methods will also go to error.html page when try to go to my testing site at http://mysite.com/store/no-this-file.html on browser(which is not existing on the store directory that just for testing). So somehow, I let it worked before or long time ago.
I can NOT remember where or when I made the error.html page forward work, Besides error page forwards is enabled(ErrorDocument 404 /error.html) in .htacess file, where else apache server can make it possible.I check /usr/local/apache/htdocs/, there is no any .htaccess
When I go to check the httpd.conf file at /etc/httpd/conf/, there is NO any about error document handle stuff
.htaccess file
==============================
ErrorDocument 404 /error.html
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
Question-2
If I try to go to directory such as http://mysite/store on browser , it will show out
404 forbidden page, I want to know where is the forbidden page is located on my
apache Centos VPS server, I try to find it at /usr/local/apache, nothing find.
Where is the fobidden page located ? because I want to do some css on it.
Fobidden page:
--------------------------
Question-1
I try to setup my own error.html for 404. But when include or NOT-include "ErrorDocument 404 /error.html" in my .htaccess file, whatever both methods will also go to error.html page when try to go to my testing site at http://mysite.com/store/no-this-file.html on browser(which is not existing on the store directory that just for testing). So somehow, I let it worked before or long time ago.
I can NOT remember where or when I made the error.html page forward work, Besides error page forwards is enabled(ErrorDocument 404 /error.html) in .htacess file, where else apache server can make it possible.I check /usr/local/apache/htdocs/, there is no any .htaccess
When I go to check the httpd.conf file at /etc/httpd/conf/, there is NO any about error document handle stuff
.htaccess file
==============================
ErrorDocument 404 /error.html
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
Question-2
If I try to go to directory such as http://mysite/store on browser , it will show out
404 forbidden page, I want to know where is the forbidden page is located on my
apache Centos VPS server, I try to find it at /usr/local/apache, nothing find.
Where is the fobidden page located ? because I want to do some css on it.
Fobidden page:
--------------------------
Forbidden
You don't have permission to access /store on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.2.23 (Unix) mod_ssl/2.2.23 OpenSSL/1.0.0-fips mod_bwlimited/1.4 PHP/5.3.21 Server at 212.1.209.242 Port 80
You don't have permission to access /store on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.2.23 (Unix) mod_ssl/2.2.23 OpenSSL/1.0.0-fips mod_bwlimited/1.4 PHP/5.3.21 Server at 212.1.209.242 Port 80