I have been fiddling with an .htaccess file trying to get it to show a default "Image Not Available" image in place of a 404 error. I have found code in other forums that has worked for others, but does nothing for me:
Code:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI}!-f
RewriteCond %{REQUEST_URI} (.*).(gif|jpg|jpeg|png)$
RewriteRule ^(.*) noimage.gif
and this one which several people said worked for them
Code:
RewriteCond %{ENV:ERROR404} .(jpg|gif|png)$ [NC]
RewriteRule ^.*$ noimage.gif [L]
Anyone had experience with this? The webserver is Apache on CentOS 5.
My goal is to block hotlinking of fullsize images and display a image when they attempt it... but allow clickable thumbnails to be shown. For some reason the following isn't working...
My htaccess looks like this:
RewriteEngine On RewriteBase /images
#Allow if it's not from another website RewriteCond %{HTTP_REFERER} ^$ [OR] RewriteCond %{HTTP_REFERER} ^[url] RewriteCond %{HTTP_REFERER} ^[url]
#Allow if it's the hotlink.gif RewriteCond %{REQUEST_FILENAME} hotlink.gif [NC,OR]
#Pass through thumbnails or hightlights as-is RewriteCond %{REQUEST_URI} .thumb.jpg$ [NC,OR]
#Return an anti-hotlink gif in place of any visual media RewriteRule .*.(jpe?g|gif|bmp|png)$ css/images/hotlink.gif [R,L,NC]
I'm noticing that apache's mod layout is dead upstream and has been for a while. I'm looking for somthing to use to put ads and a legal disclaimer on free hosted blogs (lifetype).
I normally use Win32 Clamav for scanning of viruses in servers but now it is no longer being maintained. Where can I find an equivalent? Or is there any step by step instructions on compiling it from source?
I was a reseller with WebstrikeSolutions for almost a decade and now, sadly, they are gone. Swallowed up by EasyCGI...don't know if they are any good or not but the few opinions I did manage to find haven't been very favorable at all. Plus, somewhere in the transition my credit card info got out into the world and the very next day after being billed by EasyCGI, fraudulant charges showed up on my credit card which I had to cancel! Not sure if it's a coincidence or not but the timing seems odd...so if you believe in signs, I'm thinking that that just might be one saying it's time to move on...
So, I am now looking for a replacement host. Unfortunately, trying to find out anything about the various companies by searching Google results in nothing more than a tangled mess of "review" sites that are nothing more than paid advertising for whichever hosts pays the most to be number one!
I am looking for a Windows host in the neighborhood of <$10 a month. I have been considering ReliableSite.net, m6.net, godaddy.com (except I use them to register my domain names so that might be a bad idea) and **************.com (why is a-c-cuwebhosting.com blocked out?). Any opinions about any of the above would be greatly appreciated. Of course, if anybody (other than a company owner or marketing guy/gal) has any experience with somebody else I would love to hear from you.
Now, as for requirements, my bandwidth needs are relatively low and storage doesn't need to be enormous but once my standard sites are up and running I would like the ability to offer customers individual website packages utilizing oscommerce (possibly) as their storefronts to allow them to sell their own products. Basically online stores that they don't have to code or setup themselves. That's the long term goal. Right now I just want to get my sites back online so that I can maintain and update them without incident.
As many of you may have also experienced, Easy CGI went from being one of the best hosts (I had them for 7 years and they were great), to one of the worst. They migrated to new servers and literally destroyed our site, lost data, did a search and replace of our code (yes, this actually happened), and brought our sites down completely. After about 100 hours of on-line support, chat, phone calls, emails, etc. we have to move on.
The things that were great (prior to the debacle) about EasyCGI was the Windows hosting, fast performance (FTP access was great), and the controls that were available. I'm finding it difficult to match what we used to have. I've tried GoDaddy's VPS packages and that was a complete bust due to FTP performance (would have literally taken us months to just upload our web site ... about 10 GB total).
I tried Network Solutions, but they are only Linux and although they told us they support ASP Upload, ASP Email, and a number of other controls, now tell us that those are not supported.
I've also tried APLUS.NET and 1AND1. Same peformance issues.
anyone have any recommendations for hosting that would meet these needs?
Windows (Virtual or Shared) 30 GB + disk space Unlimited Email Form Mailers (CDONTS or ASP Mail) ASP / ASP.NET / AJAX DSN with Microsoft Access databases Ability to work with SQL Server (not MySQL) databases ASP Upload (or similar) that can be coded in ASP to upload files FAST PERFORMANCE Unlimited FTP accounts (we create a folder and FTP account for each of our customers) Unlimited (or very high) transfers monthly (~ 1000 GB/MO +)
(This is the first review I've ever written for practically anything so please bear with me. I feel the need to share my experience to try to help others after all the great advice and info I've received around here.)
If you've done everything you think you can do to improve the responsiveness of your websites like add a mysql cache, PHP opcode cache and various other tweaks, I discovered there is still one more easy thing you can do for a big improvement: replace Apache with LiteSpeed. It's way too easy not to try it and you can leave Apache completely intact to go back to at a moment's notice if you so desire.
I call LiteSpeed a "drop-in" replacement because it uses all my httpd.conf and .htaccess settings without modification. This was critical for me as my sites have some very complex rewrite rules. Other solutions like LightHttpd require extensive work to make changes if you use fancy mod-rewrite rules. LiteSpeed does not need any fiddling. LiteSpeed just adds it's own clean little web interface so you can tweak if you want to, but I didn't really have to change anything. Last but not least, LiteSpeed gets along with Cpanel and DirectAdmin without any conflicts. LiteSpeed's so compatible I can literally do this on my server and the visitors don't even notice the difference (except speed of course!)
service httpd stop service lsws start (and visa versa)
I discovered LiteSpeed after reading that the main WordPress.com site had switched to it and had great success (they have a quarter million registered bloggers and of course many millions more daily readers).
The main reason I tried LiteSpeed is because it's roughly twice as efficient in memory use and performance than Apache 1.3 & 2. It runs PHP up to 50% faster than Apache and static files get served several times faster (faster than thttpd & lighthttpd). So this means you can either double the number of active connections you currently max out at now, or make a regular website respond nearly twice as fast, or under heavy loads still respond within a reasonable amount of time when Apache would be completely unresponsive.
The last situation was exactly what I was hoping for and LiteSpeed helped me keep my sanity on a bad VPS node.
Basically a couple months into owning my first VPS (after many years of shared-hosting experience) I started to realise many of the industry promises about VPS are an outright lie. You are far from isolated from your neighbours. Any disk load created by bad neighbours, mysql abuse or otherwise, will directly affect you and you are powerless to stop it. It's the most poorly regulated resource on any VPS node and it can be made worse by slack, ignorant or inexperienced hosts who do things like move accounts during busy periods onto and off a node at the root level which ties up the entire node for an hour or more. Under Apache, I was getting timeouts during peak visitor times and that was very upsetting.
On top of my VPS neighbour troubles, no matter how I fiddled with Apache's settings (with all the helpful guides around here) I could not make it comfortably fit within the guaranteed memory limit of my VPS with Cpanel, which I really wanted to keep as it's much easier for my end-users. Switching to LiteSpeed caused a radical drop in memory use. I've seen nearly 1000 people online within a one minute period on one of my sites and it still fit comfortably within my memory limits and stayed extremely responsive.
I've discovered another plus to LiteSpeed along the way that no-one else seems to mention. It's the only server software that "out of the box" seems to serve web compressed (gzipped) pages properly as chunked output. This means a visitor will start to see the page immediately as soon as the first part is sent vs. on Apache, mod_gzip actually de-chunks all the output, waits for it to finish, then compresses, then sends.
Mod_deflate on Apache 2.0 was supposed to fix this but it usually doesn't work properly and I've never gotten 2.0 to do compressed+chunked output on my sites without alot of fiddling and help from PHP. It also doesn't seem as smooth as LiteSpeed's output which gives you that "silky" watch-the-webpage render effect that's mentally rewarding to visitors.
On the downside, there is one reason you wouldn't use LiteSpeed - if you use highly customised Apache mods. LiteSpeed cannot support custom mod's and their directives. It does have a lot built in however that Apache does not, so you may way to examine if you can accomplish what you are trying to do another way.
I started with LiteSpeed 3.1 and when I found an incompatibility with an obscure Apache feature (ie. ErrorDocument's as plain text output: ErrorDocument 404 "Not Found" was not supported) they fixed it for me in a day or so after I reported it on their forum. The same for PHP support of "Apache_Response_Headers". Note I am not even a commercial customer! They are now up to 3.2 which has a few other fixes.
The free version of LiteSpeed has a limit of 150 simultaneous connections (plus the linux stack of 200 more which will backlog). I've never seen that limit hit. It's so intelligent about closing connections as needed that it's not an issue for me. Perhaps on a dedicated server with many virtual hosts this will be a problem. Up to version 3.1.1 that was the only limitation, however unfortunately in 3.2 they have decided to also limit virtual hosts to "5", so that's something else you'll have to consider if you want the free version, otherwise the commercial version has a free trial and money back guarantee.
Some people were upset with me that I wouldn't name my VPS host when I was constantly complaining of troubles but that's just my style when I have nothing nice to say still have to do business with them, so don't name names. But when I have something nice to say about a company, I like to speak up. So I heartily recommend LiteSpeed and hope other people give it a try - especially if you are on my VPS node ;-)
I am not sure if many of you have been getting this same spam. But I've been getting spam about sexual topics and the email is just an image with words written on it.
Sometimes the email has words too such as what is written below.
Quote:
Doees Using sexual Body Langauge to Attract Women Really Works? www. med72. com. Chicago Bulls' Masecot Sued For Baad High-Five
I was wondering if you know of a way to block those emails.
I installed imagemagick perl module but it is still giving off this error
Can't locate Image/Magick.pm in @INC (@INC contains: /home/user/real/mgmt/perl /usr/local/lib/perl5/5.8.8/i686-linux /usr/local/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/i686-linux /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl .) at /home/user/real/mgmt/perl/real/Image.pm line 33. BEGIN failed--compilation aborted at /home/user/real/mgmt/perl/real/Image.pm line 33. Compilation failed in require at gallery.pl line 42. BEGIN failed--compilation aborted at gallery.pl line 42.
I have developed website which will allow user to upload 1-2 photos and also allow to see other users photo and rate them. For this I have planned to go for VPS. I am also thinking of another alternative of using image hosting service, where I will keep all user photos on image hosting server and embed links given by image server in my webpage.
Now my question is.
1) Using image hosting is faster(respone time for each user) than VPS?
2) How exactly using image hosting works. when user request web page from my server, will my server go and fetch entire image from image server and then send final result to user brower?
where I can host images for my site. It will be thousands of smaller image like 5k - 30k. I am looking at free sites like imageshak. They say in their terms of service that I can host images for my site as long as I don't host all my images. So do you think that I could put like 20 thousand images on their site? These images would not get accessed too much so it won't slam their servers or anything.
I haven't been able to find much about this searching, but are people using NAS storage to deliver website images? I've never used NAS before and am not familiar with their performance.
I created a 4GB disk image for a virtual machine in Xen. (I have root on the physical box, so please don't tell me to contact my VPS provider!)
The disk was filling up, so I took the advice online and created a 6GB file with dd (zero-filled), cat'ed it to the end of my disk file, and then...
[matt@babe centos]$ sudo resize2fs -f ./cent.img resize2fs 1.39 (29-May-2006) resize2fs: Bad magic number in super-block while trying to open ./cent.img Couldn't find valid filesystem superblock. Of course, fsck won't take a disk image, only an actual partition. And I can't mount it, since I get the same error about a bad superblock.
The VM actually boots up fine, but it only sees 4GB of what's now a 10GB file.
I can use losetup to mount it on a /dev, but still get fsck errors:
[matt@babe centos]$ sudo fsck.ext3 -b 8193 /dev/loop3 e2fsck 1.39 (29-May-2006) fsck.ext3: Bad magic number in super-block while trying to open /dev/loop3
The superblock could not be read or does not describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock: e2fsck -b 8193 <device>
I don't know what blocksize was used, so I don't know where to look for a superblock... (I'm out of my league on fsck'ing virtual disks.)
The thing boots fine and is non-mission-critical right now, so worst-case, I can just mount it, rsync the data to the host, and then set up a new machine and rsync that in... I'd just rather not go through that hassle if I don't have to.
i have a forum site which is running on a vps 45gb space and 2000gb put i would like to offer my members a means to upload images small files max 5-10mb just with in the site but i would like to use a totally new server are there any shared host that will allow this has i will use a scrpit has well on it
i have set up a sever with certain software exactly the way i want it. However, there is some extra stuff i need to install on it.
I am running Centos 5.1 and would like to run some command possibly via ssh which would create an entire image of the server in a disk format such as ISO and then if need be, reinstall the basic operating system and restore the ISO back up if need be.
Is this possible?
If so how and how would i restore the image as well?
I have started a new image hosting website and currently i alloted 7 GB Disk Space and 30GB BW. I know it will not be enough after the site get famous. So which host i can go for to be in a safer side with my image hosting website?
I am having a win 2003 server with a static ip and i have hosted 2 web sites in the iis server but no images are been displayed is it something to do with the designing of the site or some problem in my hosting,
I run a large community site, and i was wondering what the max amount of images I should have in an image folder? I'm looking to upgrade to an image only server and setup subdomain folders to split up the files. right now i have about 200k+ image files in just the public image folder... thats not counting the thumbnail folder, private folders etc...
I'm trying to get a problem with image hotlinking under control. What I'd like is to allow linking to thumbnails but only allow the fullsize images to be served via another page.
What I'd like is to allow all request to /thumbs/(1-99)/*.jpg but redirect all calls to uploads/(1-99)/*.jpg to view_image.php while allowing all calls to any other existing php page on the site.
I thought it would be something like this but I've tried many variation on the standard denying hotlinking .htaccess scripts I've got and they work to a point but I can't seem to combine them to perform the above?
Can someone please put me out of my misery or point me to a good mod_rewrite tutorial!!!
I need to find out what would be the best software to run an image website for one of my clients, there is only one domain so I've considered using LiteSpeed Standard (Free)... What server do you think would be the best?
All I need is PHP support for the image viewer software.
I am working on a website that is running on IIS that cannot load any images larger than say 4KB to an outside connection. On the local LAN that this box is connected to the page loads without any issues. However, as soon as it goes out through our Microsoft ISA 2006 server to a public site it will not load images or you get only some of the image loading.