Apache :: Rules In HTAccess Showing Errors In SeoMoz Reports
May 3, 2013
How can i prevent error 302 in my site? for example, this [URL] .... is showing a status 200
But this same [URL] .... is showing me a status 302 (note the lack of forward slash)
Every folder in my site is showing this 302 error, so i tried to do a redirect in order to fix this, but its not working.
I think its the htaccess doing this kind of redirects in my hole site but I am new to this file, so i dont know how to fix this. Rules in my htaccess are here:
(I cant write into htaccess, but I can see the content of the file)...
I have some instructions written in the .htaccess of root directory for my website. So how to force those rules to apply to all sub directories even if those sub directories have .htaccess that overwrite the rules of the mother .htaccess on the root directory ? For example the root .htaccess deny access to all *.log files, so how to force that rule even if in some subdirectories there is some .htaccess files that allow access of *.log files.
It seems like someone has hacked into my server, and all of the pages for one of my domains are showing errors.
Each page on my site is showing a PHP inclusion error, each file on my site is trying to include an unknown file /tmp/blah.php for example which doesn't exist on my site, therefore creating errors and not showing my site.
I checked my site in ftp, it isn't in the code. So it is definitely in a server file somewhere.
What could be doing this? Its for a single domain only, I've created the file it is trying to include as a temporary fix, I have checked php.ini and there seems no reference to the included file there.
On our production service, we've been getting numerous malformed POST requests to some of our CGI scripts that are showing up as 500 errors in our logs. They are malformed in the sense that the actual content length doesn't match the Content-Length specified in the request.
Here's the most trivial example I can come up with that reproduces the problem for us:
In addition to the 500 error in the access log, we see the corresponding error in the error log:
(70014)End of file found: Error reading request entity data
Based on the nature of the POST request and the error response, it does appear that Apache is doing the right thing here.
The POST never actually makes it as far as the script being targeted (/some_valid_alias in the above example); in other words, Apache returns 500 to the client, writes the error to the error log and never executes the script.
Is there a way to capture/avoid internal Apache errors like 70014, and return some other HTTP status besides 500 (like 403)? It's particularly annoying in our case, because our server sends us an email for all 500 errors.
So far, our best "defense" against these 500 errors is to disallow POST for these aliases, which normally just ignore the POST data anyway (when the request is not malformed):
With this whole no-www thing going on. I've decided to have a look at whether I can do this for my domains.
Instead of writing a
RewriteEngine On RewriteCond %{HTTP_HOST} ^www.domain.com$ [NC] RewriteRule ^(.*)$ h77p://domain.com/$1 [R=301,L]
for every single domain I'd like to do this for across all domains as standard. I'm not too hot on rewrite rules and have in the past avoided them cos of the complexities. But I'd like to get this done, and no silently do it, but reflect the URL difference in the webbrowsers address bar too.
I am trying to redirect a request from a non-hosted domain, using a rewrite rule in our configuration file in conf.d. Our registrar has a pointer from this non-hosted domain to our domain.
I am writing a rewrite rules using mod_rewrite module. I have the same data repeating all over the rules that I would like to replace with variable and set variable once at the top of rules then use variable in the rest of rules. Then if I need to add another IP address I would just add additional IP address to the variable instead like now need to change several rules.
For example I have IP addresses that I would like to set as a variable.
Now rules are the following (simplified) in httpd.conf:
RewriteEngine Off RewriteCond %{REMOTE_ADDR} (192.168.5.20|192.168.7.15|10.10.20.50
I'm kinda new to apache and I have the following situation.
I have a vps, on which I have set the following:
WordPress Site A, has it's own VirtualHost and domain WordPress Site B, has it's own VirtualHost and domain Canvas LMS (not connected to a domain). Canvas LMS can add multiple accounts, which may (or may not) be accessed individually using a URL that looks as follows:
{canvas_root}/accounts/{account_id}/
For example : http://....../accounts/4/
I need to add a link to each of WP sites, which points to each site's account on Canvas, such that it appears as .../learning/ folder
I do not want the users to see the /account/4/ , just /learning/ I also want to prevent accessing Canvas LMS is located beyond the website's DocumentRoot I want this to work with both HTTP and HTTPS
initfpsuexec: using apache 1.x support PHP version file has been updated to 4.4.7 Adding cPanel default aliases ...disabled scgi-bin since suexec is installed Done Executing /scripts/postbuildapache (if exists)...Done Configuring perl magic....Off Configuring php-pear magic....Off Configuring ruby magic....Off Configuring php-pecl magic....Off /etc/rc.d/init.d/httpd start: httpd started initfpsuexec: using apache 1.x support
When I go to the [URL] ... is loads the index page just fine. When I go use the [URL] .... it still loads the index page, I don't want it to do that, I want it it to load test.php. When I click on a link (for say [URL] ....) on index.php the url stays as [URL] ....; I actually want it to show [URL] .... (while I test things at least). Is this a .htaccess issue?
This redirect works fine on Apache 2.2.8, but doesn't work on Apache 1.3.41
The following is the entry from error_log: RewriteRule: cannot compile regular expression '^sap-latest-news/([0-9]*)/([A-Za-z0-9_-.]*).htm$'
A simple Rewrite is working fine in Apache 1.3, but the above regualar expression doesn't seem to be working on Apache 1.3. Does anyone know whether Apache 1.3 doesn't support it?
I have a 2,3 and 5GB files that I need to download but everytime they appear as 1.4GB for some reason. I've tried IE, Mozilla and opera and the same result each time.
Is there some sort of limit to the size of a file that apache will serve?
I recently configured a Centos 6.5 server with Java JDK1.8 and the bundled Tomcat server X64 application. I confirmed the web server port is not already in use and also installed the Tomcat APR libraires. The application starts fine and all the logs show no severe errors however when I navigate to te URL I see a blank page. All the configuration files are in tthe correct place and whether I use just :8080 or /licenseserver the page is still blank. If I run the element inspector in the browser it shows 404 file not found.
Whenever am trying to post anything there server load increse upto 90 and Post takes so much time to publish.
and at that time sometime am getting this error
Error establishing the database connection
Here is the screenshot of the Cpanel stats:
[url]
and am getting these error in my apache error logs
[Wed Oct 28 19:46:19 2009] [error] [client 222.103.225.163] File does not exist: /usr/local/apache/htdocs/webadmin [Wed Oct 28 19:46:19 2009] [error] [client 222.103.225.163] File does not exist: /usr/local/apache/htdocs/myadmin [Wed Oct 28 19:46:18 2009] [error] [client 222.103.225.163] File does not exist: /usr/local/apache/htdocs/mysql [Wed Oct 28 19:46:18 2009] [error] [client 222.103.225.163] File does not exist: /usr/local/apache/htdocs/mysqlmanager [Wed Oct 28 19:46:17 2009] [error] [client 222.103.225.163] File does not exist: /usr/local/apache/htdocs/sqlmanager [Wed Oct 28 19:46:17 2009] [error] [client 222.103.225.163] File does not exist: /usr/local/apache/htdocs/admin [Wed Oct 28 19:46:16 2009] [error] [client 222.103.225.163] File does not exist: /usr/local/apache/htdocs/PMA [Wed Oct 28 19:46:16 2009] [error] [client 222.103.225.163] File does not exist: /usr/local/apache/htdocs/web [Wed Oct 28 19:46:16 2009] [error] [client 222.103.225.163] File does not exist: /usr/local/apache/htdocs/db [Wed Oct 28 19:46:15 2009] [error] [client 222.103.225.163] File does not exist: /usr/local/apache/htdocs/phpMyAdmin [Wed Oct 28 19:46:15 2009] [error] [client 222.103.225.163] File does not exist: /usr/local/apache/htdocs/phpmyadmin
I have installed Apache httpd and setup a SSL/TLS connection. SSL/TLS is working without a problem. I can clearly see httpS address in browser.
What I have found out that if browser gets some SSL/TLS error like trying to establish SSL/TLS connection with old protocol and web server refuses connection there is no error in SSL/TLS log recorded. I would like that every SSL/TLS attempt with error is recorded in ssl_error.log file. How to define settings in Apache config files to enable SSL/TLS error logging?
I am sorry. We are not able to resolve the File Does Not Exist errors for you. You have to do it own.
The unique errors that you have today for Apache are as follows:
client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind File does not exist: /usr/local/apache/htdocs File does not exist: /usr/local/apache/htdocs/501.shtml File does not exist: /usr/local/apache/htdocs/images, referer: [url] File does not exist: /usr/local/apache/htdocs/jailbreak-iphone-3-0-1-with-redsn0w File does not exist: /usr/local/apache/htdocs/robots.txt Invalid method in request x16x03x01 Invalid method in request x80bx01x03x01 # Invalid URI in request alt="Follow%20via%20FreiendFFeed"%20title="Follow%20via%20FriendFeed"%20border="0"%20height="16"%20width="16"%20/>Home Top%20StuffiPhoneWindows%207FirefoxVistaTipsWordpressSubscribeSitemapAdvertise xc2xa0xc2xa0xc2xa0Vertical1240899%20=%20false;ShowAdHereBanner1240899%20=%20true;RepeatAll1240899%20=%20false;NoFollowAll1240899%20=%20false;Ban nerStyles1240899%20=%20new%20Array(%20%20%20%20"a{display:block;font-size:11px;color: HTTP/1.1 PHP Fatal error: Call to a member function get() on a non-object in /home/technob2/public_html/wp-includes/cache.php on line 93 PHP Fatal error: Call to a member function get() on a non-object in /home/technob2/public_html/wp-includes/cache.php on line 93, referer: [url] PHP Fatal error: Call to a member function get() on a non-object in /home/technob2/public_html/wp-includes/cache.php on line 93, referer: [url] PHP Fatal error: Call to a member function get() on a non-object in /home/technob2/public_html/wp-includes/cache.php on line 93, referer: [url] PHP Fatal error: Call to a member function get() on a non-object in /home/technob2/public_html/wp-includes/cache.php on line 93, referer: [url] request failed: error reading the headers
I would advise that you resolve as many of these errors as you are able.
As to what caused the load on your server, I can't say. There is nothing in your logs to indicate the source of the problem. During the 1PM period when your server overloaded last there were only 29 errors in Apache. The errors that occurred during this time would not cause excessive load.
I have installed a script to monitor your server. If this load issue occurs again within one week or before your next reboot, whichever comes first, we should be able to determine the source from the script's logs in /var/log/sys-snap.sh.
It seems with the latest version of 2.2.24 I've had to change the ProxyPass address in http-virtualhosts to the actual address of the web server itself (Websphere / tomcat) and not the reversproxy (Apache). It seems like originally we had it looking like this more or less: ProxyPass / ajp://localhost:8009 but now have ProxyPass / ajp://webserverip:8009 and it's working that way. Which way is correct and if this isn't the correct way how do I fix this? I was getting 503 errors when it was connected to localhost (along with ajp errors) but I was able to telnet to the webserver on 8009 successfully.