Netscraps

A windsurfing, CSS-grudging, IE-hating, web-developing, gigantic-machine-puzzling blog

Category: awful usability

Plesk Apache 404 error: File does not exist: /var/www/vhosts/default/htdocs/

You’ve no doubt discovered massive amounts of 404 errors in your main Apache error log that go something like:

File does not exist: /var/www/vhosts/default/htdocs/....

The requests may appear to be legitimate requests for page on the the primary virtualhost, but are returning 404 errors. Or, they may be crap requests to /var/www/vhosts/default/htdocs/phpMyAdmin etc made by script kiddies looking for vulnerabilities. Sound familiar?

Chances are you have SSL disabled for the domain in Plesk, & these requests to vhosts/default/htdocs/ are from HTTPS requests.

Plesk handles this use case in the most asinine way possible.

Since you have SSL disabled for your virtualhost, Plesk doesn’t route HTTPS requests to any virtualhost. Instead, it’s using the default host settings in /etc/httpd/conf/plesk.conf.d which can be something like:

<VirtualHost your_ip_here:7081 127.0.0.1:7081>
    ServerName "default-your_underscored_ip_here"
    DocumentRoot "/var/www/vhosts/default/htdocs"
    ....
</VirtualHost>

Little-known (to me) Plesk fact: For SSL requests, Apache listens to port 7081 when it’s running behind nginx, per /etc/httpd/conf.d/ssl.conf

How do you know this is going on? Enable servername & port logging in access_log so you can tell exactly what these requests are coming in as. To set that up, in /etc/httpd/conf/httpd.conf look for where your main access_log is defined, like:

 CustomLog logs/access_log combined

Then look for a LogFormat line that defines the log format nickname “combined”:

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined

Add %v %V %p in there — right after %t is a good spot. Doing this adds the servername in two flavors, & the port of the original request. The servername helps you to determine which section of your Apache config is getting used, if you aren’t sure. The port shows the original — not mapped — port of the request. HTTPS starts out as a port 443 request so you’ll see that in the access log, not port 7081.

Restart Apache, either through Plesk, or apachectl restart. Then go tail -f access_log  to watch the log with that additional data.

How do you fix how Plesk handles these SSL requests? In Plesk…

  • In Hosting Settings for your domain, check the box to enable (…yep) SSL.
  • In the Apache & nginx settings for your domain, under “Additional directives for HTTPS “, add this RewriteRule to redirect HTTPS requests to HTTP:
RewriteEngine On
RewriteRule .* http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

That’s the best way I know how to fix this, anyway.

Any other suggestions? Normally you could set up a “black hole” entry, but I’m not sure how to overwrite the default Apache server settings, since server.conf is auto-generated by Plesk.

I’m off to bang some rocks together.

MediaTemple TrueSpeed CDN Control Panel Is Not What You Think

This is MediaTemple’s sales page for their TrueSpeed™ CDN, which is a rebranded product operated by SiteLock.com:

MediaTemple TrueSpeed CDN Sales Page

Sounds great & what a deal, right? I thought so. Note the “integrated control panel”. Here’s what you actually get for the control panel:

Only having on/off & purge-all controls is not the right way to manage a CDN, in the same way that driving using only the ignition switch & yelling “get the fuck out!” to all passengers is not the right way to drive a bus.

Hopefully this guy from the TrueSpeed CDN sales page is designing a new control panel.

This guy on MediaTemple’s CDN sales page is no doubt hard at work designing a real control panel.

With MediaTemple’s TrueSpeed CDN there are no traffic stats or reporting, & no asset purge controls except for all-or-nothing.

I had been using Edgecast ProCDN (through MediaTemple) which has a real control panel with nice purge controls & very detailed traffic stats/reporting.

If you sign up for the same CDN through SiteLock.com & not via MediaTemple, you get a much more capable control panel with all the features you’d expect for managing a CDN, but you’ll probably pay more than $30/month.

I think MediaTemple’s TrueSpeed CDN is still a good deal & no doubt they have plenty of customers who don’t need CDN stats or any real controls.

But MediaTemple should be far more upfront about what customers actually get for the “integrated control panel”. Maybe they should call it what it is: “integrated on/off/purge buttons”.

In lieu of MediaTemple being upfront about it, now you know!

Workaround For MediaTemple’s Lame Gridserver Cron Job Limitation

MediaTemple limits their GridServer (GS) customers to only 5 cron jobs.

Some restrictions make sense … some don’t!

This makes absolutely no sense.

MediaTemple allows cron jobs to run as often as every 5 minutes … I needed more than 5 weekly processes, which put no strain on the server compared to someone who sets up 5 jobs to repeat every 5 minutes.

Limits on cron jobs by run frequency would be far too logical.

As a workaround, combine all your weekly crons into one daily job, your daily crons into an hourly job, etc. Then create a shell script that uses date logic tests to branch out to different jobs, based on the day of the week or hour of the day.

For example, here’s a daily cron script that branches out into weekly jobs:

if [ $(date +%u) -eq 1 ]; then ./monday.pl
elif [ $(date +%u) -eq 2 ]; then ./tuesday.pl
elif [ $(date +%u) -eq 3 ]; then ./wednesday.pl
....
elif [ $(date +%u) -eq 7 ]; then ./sunday.pl
fi

If you don’t have a job for every day of the week, just leave out the logic test for that day & the cron script will exit without running anything further.

Similarly with a cron script set to run hourly, you can test the hour to run up to 24 different daily jobs (one for each hour):

if [ $(date +%k) -eq 0 ]; then ./twelve-oclock-am.pl
elif [ $(date +%k) -eq 1 ]; then ./one-oclock-am.pl
elif [ $(date +%k) -eq 2 ]; then ./two-oclock-am.pl
....
elif [ $(date +%k) -eq 23 ]; then ./eleven-oclock-pm.pl
fi

Taking this to the extreme, in theory you could use an every-5-minutes cron job to test $(date +%M) and run up to 12 different jobs per hour. And it goes without saying you can combine these day/hour/minute logic tests to create 2,016 possible combinations, or throw in some $(date +%d) day-of-the-month tests for 62,496 possible cron jobs. Take that, MediaTemple-cron-limitation-type people!

Obviously the script names in the examples above (monday.pl, twelve-oclock-am.pl, etc) can be changed to anything you want.

I’m not on MediaTemple’s GridServer platform anymore, but hope this helps someone. I switched to a their DV/VPS platform & promptly discovered they assigned a blacklisted IP to my account. So far they are refusing to fix it. Good thing MediaTemple doesn’t sell cars.

UPDATE: To their credit, MediaTemple finally saw the logic in providing new accounts with non-blacklisted IPs, so that’s good.

The Samsung Series 7 Chronos NP700Z5A-S03 has a very sharp wrist rest.

Samsung Series 7 Razor-Sharp Wrist Rest

The Samsung Series 7 Chronos NP700Z5A-S03 has a very sharp wrist rest.

The Samsung NP700Z5A is so sharp, it hurts.

I researched the Samsung Series 7 Chronos for several days, reading glowing review after glowing review.

Not one mentioned the wrist rest edge is literally sharp enough to hurt.

Either the reviewers all have very small hands, or they completely overlooked this awful design flaw. While the Series 7 is a thing of beauty closed, while open & in use, it’s torture.

The wrist rest is so sharp, it literally makes a scratching noise against skin & leaves white scrape marks. The problem is Samsung put the wrist rest surface inside the outer case (which is metal), so the sharp edge of the outer case sticks up slightly & its unbeveled metal edge digs into your wrist. Not nice.

Another significant usability flaw is the ELAN touchpad. With the default settings, scrolling a page is jumpy & the motion actually reverses direction every few seconds. Also since the pad is so huge, it’s hard not to touch the edges inadvertently when typing & ELAN’s palm filtering isn’t nearly as good as Synaptics’ touchpads. Eventually I was able to improve things by lowering the sensitivity to the 3rd-lowest level. To add insult to injury, the touchpad buttons usually stop responding after resuming from sleep mode.

Yet another flaw is the wifi range. This issue actually was mentioned in most other reviews, so I won’t go into detail other than to say I get one bar with the Series 7 where I get 4 bars with our other laptops. To watch streaming HD video, I have to be in the same room as our 802.11n wifi router.

My last gripe is with Samsung’s screen auto-dimming feature. It uses an ambient light sensor to adjust the screen brightness. However the Series 7 does it in very sudden & noticeable steps, in immediate response to every little change in ambient light. If you’re working near a window on a partly sunny day, or have an overhead light behind you & don’t keep perfectly still, the auto-dimming feature on the Series 7 goes bezerk trying to adjust. Luckily you can disable the feature entirely.

The Series 7 also has a lot to like, such as the thin case, light weight, super-fast boot time, long battery life, non-glare matte screen, fantastic backlit keyboard …

The touchpad & auto-dimming could be fixed with software updates, but the knife-edge wrist rest is just plain stupid. For now, the horrid usability issues ruin what would otherwise be a very nice laptop.

UPDATE: Okay, another gripe — I’ve also been getting a Blue Screen Of Death (BSOD) caused by asmtxhci.sys when resuming from sleep mode, whenever I have my iPhone plugged in to one of the USB 3.0 ports. The asmtxhci.sys file is the USB 3.0 host driver from ASMedia Technologies, Inc. The BSOD happens often enough to be a nuisance. Once again, hopefully a software patch will fix it. For now, it’s yet another problem that doesn’t improve my opinion of the Series 7 Chronos. Using the USB 2.0 slot for my iPhone seems to work around the problem.

Powered by WordPress & Theme by Anders Norén