Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Apache2 under Ubuntu 12.04

I get a 403 error only sometimes when a URL is passed to a PHP script in WordPress via the PressThis button. e.g.

http://dev.wakawaka.com/wp-admin/press-this.php?u=http%3A%2F%2Fwww.foohoo.org%2Fpb%2FThe-Future-of-Our-Schools&t=The%20Future%20of%20Our%20Schools%3A%20Teachers%20Unions%20and%20Social%20Justice%20%7C%20Haymarket%20Books&s=&v=4

This results in a 403 in the browser, and access.log is appended. But error.log is not appended.

Other URLs don't fail - they work properly, such as

"GET /wp-admin/press-this.php?u=http%3A%2F%2Fwww.yeehaw.com%2Fproducts%2Fduet2.php&t=Apogee%20Duet%202%20-%202%20IN%20x%204%20OUT%20USB%20audio%20interface&s=&v=4 HTTP/1.1" 200 7962 "http://www.apogeedigital.com/products/duet2.php" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17"

I have set loglevel to the most verbose setting of emerg. No error appears when the 403 is thrown.

Also, I have edited .htaccess to a minimal version that does no security and the condition still persists for some URLs.

Any ideas?

share|improve this question
add comment

1 Answer

By setting your LogLevel to Emerg (Emergencies - system is unusable.) you have reduced logging to it's minimum amount and only the most serious conditions are logged. You will need to increase log verbosity to at least Error to see 403's being logged.

LogLevel Error 

restart the apache service and you should be good.

share|improve this answer
    
thanks. unfortunately, made the change, cleared browser cache, hit the offending URL as above and no change to error.log. The last entry shows the server restarting. –  Miller Jan 22 '13 at 13:05
    
@Miller: This works on the systems (Ubuntu and CentOS) I have to hand. Did you restart Apache after making the change ? Does the vhost you're connecting to have it's own ErrorLog directive ? –  Iain Jan 22 '13 at 13:27
    
did restart, no change. The server directive for the vhost in question is ErrorLog ${APACHE_LOG_DIR}/error.log with an accompanying CustomLog ${APACHE_LOG_DIR}/access.log combined –  Miller Jan 22 '13 at 13:55
    
I did notice that access.log is showing a 403 plus 407 error that I had overlooked. Here's an example of a URL that fails: pastebin.com/04f724Fc –  Miller Jan 22 '13 at 13:56
    
Note also please the error text presented in the browser reflects the 407 error, but I am logged in - to WordPress, so I don't understand what's going on. You are not authorized to access the webpage at dev.cityblocchicago.com/wp-admin/…;. You may need to sign in. –  Miller Jan 22 '13 at 14:01
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.