Apache :: Deny Direct Access To Images From Other Websites In HTAccess
Jan 28, 2013
I have recently had number of websites that link directly to images from my website. This is not hotlinking, it is direct server request. As an example: on the linking website there is image gallery script with thumbnails and when the visitor clicks on the thumb it calls the image from my website.
I block their IP-s in .htaccess, but it is not the best way to stop them since IP change. Is there any way, similar to anti-hotlinking, to deny such direct access to my images by domain name i.e. to allow only from my website and deny from all others. Or something else that could work in my case with .htaccess.
View 8 Replies
ADVERTISEMENT
Jun 21, 2014
I would like to deny access to .log
View 1 Replies
View Related
Mar 8, 2015
I'm using .htaccess to show existing images instead of images which does not exist.
RewriteBase /images/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)_(.*)1200x900.jpg$ esittely_$21200x900.jpg
RewriteRule liiga1200x10.jpg esittely1200x10.jpg
RewriteRule liiga670x10.jpg esittely670x10.jpg [L]
Everyting works fine if an image does not exist.
But if an image does exist, the second RewriteRule
RewriteRule liiga1200x10.jpg esittely1200x10.jpg
will be used.
Why is that so? How could I modify my code to prevent that?Â
View 2 Replies
View Related
Oct 26, 2014
in wordpress is wp-includes folder, i dont want anyone just execute file from this directory so it just serve wordpress not any malicious file be executed from there,
so i added this rule into /wp-includes/.htaccess:
RewriteRule ^(wp-includes)/.*$ ./ [NC,R=301,L]
View 2 Replies
View Related
Apr 2, 2007
I have amassed a large number of IP addresses [both partial and whole] in my .htaccess file-- which I deny access to. I have two questions:
[1] Can a larger list effect server performance?
[2] MySQL databases seem to be ignoring the .htaccess list. Why would this happen?
View 2 Replies
View Related
May 22, 2007
I have a java applet that displays (local)images. I also have anti leach code in .htaccess that is adde via cpanel:
.htaccess contents:
Code:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://owndomain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://owndomain.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.owndomain/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.owndomain.com$
RewriteRule .*.(jpg|jpeg|gif|png|bmp)$ - [F,NC]
Symptems:
1- Java Applet loads && runs ok but doesn't display images.
2- When .htaccess file is removed, images display ok.
View 4 Replies
View Related
Apr 29, 2009
how can i deny all of ip instead 2 ip to access to some website?
because these are priv8 website and personal .
i thin that .htaccessis good.
can nany one creat it for me and ist good or use another method?
View 4 Replies
View Related
May 23, 2008
Is there a way to prevent accessing the website using the domain.com/~username/
Currently on most (all?) cpanel hosting plans it's possible to access the site via [rl].
Maybe there is something to prevent that as it could cause very serious duplicate content issues.
Moreover, I think it's a global bug that affects millions of hosting accounts. Yahoo, for example, many times indexes wrong URLs because of that... In many situations, if I knew your cpanel username, I could link to it instead of your domain to remove your site from search engines..
View 5 Replies
View Related
Nov 6, 2008
I signed up for hosting with IX Web Hosting in April of 2007. There have been two occasions that they provided the perfect example of Terrible Customer Service. So much so, my last pony ride with IX Web Hosting was my last. I decided to call it quits and move my account to Host Gator.
I keep my most important sites on a dedicated server at Servint.net. If you are interested in a dedicated server or VPS, I highly recommend Servint. You will not beat the level of service and professionalism this company offers. But that’s another post in itself.
The point is, I had some SEO tests I wanted to perform and I was looking for a hosting company that would allow me to host 10 different domains in the same account on different ip addresses. IX Web Hosting had the plan I was looking for. So in April of 2007, I signed up for a hosting account.
Overall, I was pretty satisfied with the server performance at IX Hosting. I experienced very little if any downtime from server issues. They don’t offer a standard cpanel interface like most web hosts. It appears to be a proprietary / in house control panel.
It was pretty straight forward and with a little time I was up to speed.
Then on June 5, 2008, I got the following email from a System Administrator at IX Web Hosting.
---------------------------
Hello,
My name is Anthony, and I am a system administrator at IXWebhosting. I’m here to ensure a reliable and fast hosting / e-mail environment. This is the reason why I ask you to get in touch with us.
We have received numerous complaints from third-parties about spam originating from your website. As you may know, spam is an on-going problem for all internet users, hence all companies have very strict rules against spam. I am here to ensure that neither you nor any other customer is facing any downsides which could be the result of these spam regulations.
We ask you to immediately cease and desist any such activities. If you are unaware of this activity, please contact me or any of my colleagues via this ticket, phone or live-chat so that we can find the reason for the spam activity together and fix the issue instead of the symptom. Viruses and things of that nature may be installed on your computer and will cause the spamming. We recommend that you run an anti-virus program. If you currently do not possess an anti-virus program, you may download a free version. Please just follow the link below to find Google’s best links for free anti-virus software:
google.com/search?q=free+anti-virus+software [url]
In order to ensure your hosting and mail environment is working flawlessly, we ask you to get in touch with us within the next 72 hours. I highly appreciate your time.
Best Regards,
Anthony Washington
System Administrator
IXWebhosting
-----------------------------------
They identified the domain as bestadtracking.com. This is a domain I own but have never promoted. Not only had I not sent spam through IX Web Hosting, I averaged less than 200 sent email a month on all the domains on my account. So on June 6, 2008 I responded to IX Web Hosting with the following two messages.
-----------------------------------
Hi Anthony,
I can assure you I am not sending spam from this domain or any others. I’m a little surprised that this domain is in question? I set it up over a year ago and haven’t ever promoted it. I don’t send any type of email over this domain. I have no reason to. It gets no traffic or inquiries.
Are you sure there isn’t some type of mistake? Otherwise, there are a couple of php style contact forms on that site. Could a hacker use that sort of thing to send spam? How can we track this down?
Thanks,
Brent Crouch
615-389-XXXX
-----------------------------------
Here is the second email I sent on the same day.
-----------------------------------
Hi Anthony,
I am using AVG on my computer and the scan completed finding no viruses. Besides that, I am using Outlook to manage the mail on several of my domains. I don’t even have a send account setup for bestadtracking.com on my computer. As I stated in the previous reply, I have no reason to since this domain is not promoted.
Can you give me the IP address of where the spam originates? I’d like to compare that to my IP address here at home and office.
Thanks,
Brent Crouch
-----------------------------------
I had no information to track the issue any further. The lack of response from IX Web Hosting left me to believe the issue had been resolved or there had been a mistake. Then 4 days later on June 10, 2008 I got this message.
-----------------------------------
Brent
We tried to reach you today in order to resolve this issue, but unfortunately it has been well over 72 hours since this ticket was placed. We must sadly suspend your services, please do not hesitate to call us at 1-800-385-0450 any time, day or night.
Best Regards
Ian
-----------------------------------
Amazing! They give me no information to solve this problem. On top of that, they don’t respond to my ticket in 4 days and because I didn’t answer the phone when they called they suspended not only the domain in question but every domain listed in my account.
I called in and spoke to a tech support guy who allowed me to remove the domain in question and in return, he restored my other domains. He also left a message to have the tech support manager call me the following day.
The manager I spoke to apologized for the way the ticket was handled and the lack of information that was given. He said he would follow up with the employees that were responsible for the ticket and make sure it never happened again. He was helpful in looking at the server logs and determining how someone had loaded a spam bot onto my site.
Apology accepted. Stuff happens. I considered it water under the bridge and not a big deal. Not so much…..
After my first run in with IX Web Hosting, I wrote the whole incident off as a fluke. The manager I spoke to seemed very sincere and assured me that wasn’t proper protocol and wouldn’t happen again. I was trucking right along until I got this email from them on October 26, 2008.
-----------------------------------
Dear Brent Crouch,
We have received notification of phishing material in your account. Phishing files are usually placed through some type of exploit of out dated code, weak file and folder permissions. Packaged shopping carts and photo galleries are usual sources as hackers find exploits and developers fix them almost daily, so unless you constantly update the software or completely secure it things like this can happen.
You must agree to remove this content and update any software that has resulted in security holes. To protect your account from further action you must agree to our request for compliance. Please respond to this message stating your intent to do so. You may either log into your control panel with us, and access this ticket via the 24/7 help desk, or provide this ticket number to our Live Chat or phone representatives. Failure to respond to this message within 72 hours will result in the suspension of the affected domain with us until such a time as this matter is resolved.
Michael
-----------------------------------
The email gave me no indication of which domain had been hacked. When I wrote to live help and gave them the ticket number, I spent 10 minutes waiting only to be told they didn’t know which of my domains had been effected. They recommended I reply to the online support ticket.
Here is the email I sent them in response on October 27, 2008.
-----------------------------------
I replied to live help and they could not find any information. So far you haven’t told me which domain is a problem.
Please give me the info I need to correct this problem and I’ll take care of it.
Brent Crouch
615-389-XXXX
-----------------------------------
Eight hours later, I was able to find the problem by viewing all the files on my domains and looking for the files that had been recently changed. It turned out my brentcrouch.com domain had been hacked and setup with all sorts of eBay and bank phising pages. The site operates on a Wordpress platform which is widely used and is a big target for hackers.
[url]
I wrote back to IX Web Hosting for a second time on October 27, 2008.
-----------------------------------
I found the problem on my brentcrouch.com domain. I updated the wordpress software to the latest and cleaned up the problem. The only exception is the brentcrouch.com/forum directory. I am unable to delete this directory as the hacker has removed my access. Please delete the directory.
Thanks,
Brent Crouch
-----------------------------------
The following day, here is the email I got back from IX Web Hosting.
-----------------------------------
Brent:
Thank you for your attention to this matter. Per your request we have removed:
/brentcrouch.com/forum - deleted
We will be closing this ticket at this time. If you have any questions please feel free to contact us. We will be happy to assist.
Please note that this is the second time this problem occurred. Unfortunately, I have to bring to your attention that as per our terms of service a third instance will result in immediate account termination without notice. No backups will be provided. If you have any questions about how to avoid this from happening again our support team will be glad to advise.
Respectfully
Frankie
Support Tech Representative
-----------------------------------
When I seen that response, I was pissed! I run my own server at Servint.net. I’ve hosting accounts at several other hosting companies. I’ve never had a site hacked except from IX Web Hosting.
In 4 months, I’ve had two sites hacked. In both instances, IX Hosting was zero help in locating the source of the problem. In the first incident, they didn’t even reply to my ticket for 4 days. In the latest incident, they couldn’t even tell me what domain was hacked.
Then they send me an email telling me if it happens again not only will they suspend my account, they’ll deny me access to my files! Huh?
That’s not a risk I’m willing to take. With the high costs of obtaining customer’s in this business, I’m a little surprised they don’t do a better job of trying to retain them. In my opinion, this policy is unacceptable and makes IX Web Hosting one of the worst hosts I’ve ever dealt with.
I just signed up for a hosting account with Host Gator and have already moved all my domains over. So far, so good.
What’s your experience with IX Web Hosting?
View 14 Replies
View Related
Jul 18, 2007
INTRODUCTION
As owner of a hosting provider company, I face the problem of abusive users almost every day. More than 90% of all abuse on my server comes from free trial accounts. I offer free trial access to my servers for people who want to try things out before they purchase a hosting package, but off course this attracts spammers. To prevent trial users from using my server for spamming purposes, I modified my exim.pl file to prevent trial users from accessing the Exim mail server.
Please note that this tutorial has been written for cPanel servers. If you want to use it on a server with a different control panel, you'll need to modify the cpgetpack.c source. If you do so, please share your work with the community by posting it in a reply here.
STEP ONE
First you’ll need to download, compile and install my cpgetpack.c application. Here’s how:
Code:
gcc cpgetpack.c -o cpgetpack
mv cpgetpack /usr/bin/
chown cpanel:cpanel /usr/bin/cpgetpack
chmod +s /usr/bin/cpgetpack
STEP TWO
Now open the /etc/exim.pl file in your favorite text editor (make a backup first) and look for the following inside the checkuserpass subroutine:
Code:
$trueowner =~ s////g;
$trueowner =~ s/..//g;
if (isdemo(${trueowner})) {
return('no');
}
Below, paste the following code:
Code:
my $name = getpwuid($uid);
open(UP, "cpgetpack $name|");
my $userplan = <UP>;
close(UP);chop($userplan);
if ($userplan eq "radix_FreeTrial") {
return "no";
}
You will have to replace the radix_FreeTrial string with the package you assign to your trial users. This will prevent trial users from authenticating which prevents them from sending mail remotely.
STEP THREE
Users are now still able to send mail locally (for example using the PHP mail() function), so here’s what to do next.
Find the checkdemo subroutine in the exim.pl file and replace the complete subroutine with:
Code:
sub democheck {
my $uid = Exim::expand_string('$originator_uid');
if (isdemo($uid)) { return 'yes'; }
my $name = getpwuid($uid);
open(UP, "cpgetpack $name|");
my $userplan = <UP>;
close(UP);
chop($userplan);
if ($userplan eq "radix_FreeTrial") {
return 'yes';
}
return 'no';
}
STEP FOUR
Now just restart Exim:
Code:
service exim restart
It might be a good idea to create a trial account and see if it’s working. Enjoy!
REFERENCE:
Original post: [url]
Best regards,
Josh Burt
View 0 Replies
View Related
Aug 14, 2007
This topic has probably been covered many times. I am trying to block spam bots from direclty accessing scripts on my site. Measures I have taken thus far, also block my site pages that want are designed to use the scripts. This includes Hot Link Protection and a couple of directives in the .htaccess file.
how I can block direct access to my scripts?
View 0 Replies
View Related
Jan 3, 2015
Plesk: 12.0.18
phpMyAdmin: 4.2.5
When I try to access phpMyAdmin directly from the link: [URL] ....
I get the following error:
Welcome to phpMyAdmin
You probably did not create a configuration file. You might want to use the setup script to create one.
Error
MySQL said: Documentation
Cannot connect: invalid settings.
Retry to connectClick to expand...
View 3 Replies
View Related
Jul 24, 2008
Earlier when my client's domain was not resolved he used to easily access his website using [url]
But after putting in the openbase dir protection they cannot access the site anymore.
how can the user view their site when openbase is protected?
View 1 Replies
View Related
Jan 17, 2007
I think I broke my server. I was trying to install Zend Optimizer, but it didn't work.
After doing some research, I found out that I needed to disable selinux. After doing so, I rebooted. Then I installed Zend Optimizer and rebooted again.
Since then, all my websites have been inaccessible. I can access my server through Plesk control panel, but connection to my websites just timeout.
What can I do to fix this?
Edit :
I can access my sites via FTP as well.
Edit 2 :
I tried starting Apache with the following command :
Quote:
/sbin/service httpd start
...but it keeps on telling me that the service is already in use.
It seems like TCP is bound to port 80.
View 1 Replies
View Related
Feb 9, 2007
I edited the /etc/apf/deny.hosts_rules files, then removed all lines from the file and finally restarted apf so it can restart with no deny host listed. But that is not working... the file appears empty or again with the rules removed before.
iptables -L -n shows the same banned hosts as dropped.
I already tried.. remove the deny hosts IPs from the file, then ran "iptables -F", then "service iptables save", and finally restarted apf and the deny IPs still there
View 6 Replies
View Related
May 28, 2008
I am seeking a solution such that the apache vs 2 denies php or allowing requests out of the server to say domain abc.com and its entire IP block.
I have done so far is used apf -d abc.com to deny outgoing and incoming requests and the php pages (proxies) cannot access the site anymore).
But what i want it something hardcoded into apache itself so it blocks all php based request going off the server to that domain.
How can i go about it?
using centos5 apache 2 and cpanel!
View 2 Replies
View Related
Oct 10, 2013
I have a simple app where i am currently downloading some images from the internet. I want to use a local web server to host some of these images when i am not connected to the internet. I installed the apache web server and added the images folder under htdocs - my document root.
Now, i want something like when i continue to query images from www.examplesite.com/xyzimage.png within my app, it should be redirected to localhost/images. Is this possible? I tried doing this
In C:WINDOWSsystem32driversetchosts i added this line URL:...
Also in the httpd.conf i set the foll -
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?examplesite.com$ [NC]
RewriteCond %{REQUEST_URI} !^/examplesite
RewriteRule ^(.*)$ /images/$1 [L]
but it doesnt seem to work.
View 1 Replies
View Related
Jun 17, 2013
I have vhost setup for test of a new website. I want to allow access on the localhost, and, from one IP from the Internet (redacted). Apache serves the site just fine on the server but I can't access the site from my the "xxx...." IP.
I'm using a physical path to test from the public IP as follows:
xxx.xxx.xxx.xxx/~user/test/index.html
View 3 Replies
View Related
Jun 17, 2013
I have vhost setup for test of a new website. I want to allow access on the localhost, and, from one IP from the Internet (redacted). Apache serves the site just fine on the server but I can't access the site from my the "xxx...." IP.
I'm using a physical path to test from the public IP as follows:
Quote:
http://xxx.xxx.xxx.xxx/~user/test/index.html
Apache v2.2
RHEL6
UserDir configured/running
SuExec configured/running
Below is the relevant vhost block in httpd.conf:
Code:
<VirtualHost *:80>
ServerName test
ServerAlias test
DocumentRoot /home/user/public_html/test
<IfModule mod_fcgid.c>
[Code] .....
I don't have a FQDN as yet, so I just made a entry in /etc/hosts as follows:
Code:
127.0.0.1 test
Here is an excerpt from the Apache error log:
Quote:
[Mon Jun 17 12:02:16 2013] [error] [client xxx.xxx.xxx.xxx] client denied by server configuration: /home/user/public_html/test/index.html
I've checked the firewall and the /etc/hosts.allow- that's not it. I've read the Apache docs and in the vhost block Allow should be evaluated last, and apparently is matching localhost but is not matching my IP.
View 5 Replies
View Related
Sep 4, 2008
i have a Dedicated server and i installed firewall and i fixed all cpanel option and i disable shell access for all users and ......
but my users can upload shell hack files (Like:c99 ) then they can access to another website ,,,, they can`t Write ,,, they can Read files only
but there is a problem because the hacker will read the config files so my Database websites will hack soon
View 14 Replies
View Related
Sep 20, 2014
I have been a solid cPanel / WHM user for the past 2 years, we have now since downsized our hosting requirements and also wanted to cut our panel costs and so we moved to PLESK 12 Web Edition.The server is on a trial license and has been working fine with no problems for the past 2 weeks. Today all of a sudden none of the websites are accessible, although I can ping all IP's on server and login via SSH.I cannot access any websites or hosting control panel, I have disabled IP tables as this was the cause of a problem last time.
Why this happened was there an update at around 5AM this morning which could have caused this?I have restarted the server, I can successfully ping / resolve address from SSH.
View 3 Replies
View Related
Oct 24, 2014
I want to save the access logs of our websites on an external server. If I do this now with the default setup, the gets overwritten every day. The desired file name format whould be: websitedomain-tld-access-2014-10-24.log
How can I tell Plesk to do this and how can I make sure the statistics keep working?
On our other servers we use rotatelogs for this.
View 3 Replies
View Related
Apr 12, 2013
I've set up a reverse proxy using the Ubuntu Apache2 package (2.2.2, with evidently an old version of mod_proxy_html), and it's about 50% functional, but certain images aren't loading.
I've tried with and without ProxyHTMLExtended on, but even with it on I'm not convinced that any non-inline scripts or CSS files are being properly handled, as they are being directed to my local root directory instead of /app1/, and when it is on, I can no longer log in to the internal webapp.
In the log, the only errors that stand out to me are those referencing things from relative root directories, like /images/* and /ajax/*. The image files are coming from separate CSS files, and it doesn't tell me where exactly the ajax references are originating.
Here is the relevant part of my VH config:
ProxyRequests Off
ProxyPass /app1/ http://example.com/
ProxyHTMLURLMap http://example.com /app1
ProxyHTMLLogVerbose On
LogLevel debug
<Location /app1/>
ProxyPassReverse /
SetOutputFilter proxy-html
ProxyHTMLURLMap / /app1/
ProxyHTMLURLMap /images([^)]*) url(/app1/images$1) Rih
ProxyHTMLURLMap url(http://example.com([^)]*)) url(http://localhost/app1/) Rih
RequestHeader unset Accept-Encoding
</Location>
And here's an example of the errors:
[Thu Apr 11 23:22:50 2013] [error] [client 127.0.0.1] File does not exist: /var/www/images, referer: http://localhost/app1/css/examplefile.css
[Thu Apr 11 23:31:00 2013] [error] [client 127.0.0.1] File does not exist: /var/www/ajax, referer: http://localhost/app1/admin/
Comparing the source to the proxied version, I see that the images are going from "/images/*" to "/var/www/images/*".
View 1 Replies
View Related
Mar 28, 2014
I recently started building out a new network rack to provide a production web site. The new equipment stack includes a disk array providing a CIFS file share to store images to be served up by Apache.
I have had zero luck in getting Apache to properly access the imagestore from the network share. I've read more Google pages on this subject today than I can count, but I am still not having any success getting this working right.
I'll do my best to explain the configuration.
I have an ESXi host running several virtual machines. Each machine needs to be able to access the shares. Each host has multiple network interfaces, each connected to a separate subnet. The virtual machines are running Windows Server 2012 Datacenter edition.
The disk array is file mode access, with NFS and CIFS shares. It has interfaces on both subnets that each VM can reach. I have established a stand alone CIFS server, with the shares configured. They are accessible from the VMs.
I have mapped the share to a drive letter on the VM client, and it works properly from the logged in account. I have full control over files on the file system (create, modify, delete).
The VM has Apache 2.4.9 installed.
Things I've tried with no success:
-created a symlink to the CIFS mounted drive into the webroot directory
-added an alias to the CIFS mounted drive
-added the aliased directory using the <Directory> directive
-added the alias and directory directives using UNC references
I am seeing errors like "path is invalid" mostly, but when I try to add the mapped drive (f or the UNC referenced directory, the Apache service won't start.
I added a separate user for the Apache service, and added it to the group that has privileges to talk to the share, still didn't work.
View 1 Replies
View Related
Apr 23, 2009
how can i control via IP who can access a site? I want to redirect everyone to /downtime.php and only allow myself IP 1.1.1.1 to access the /index.php page and the entire site
View 2 Replies
View Related
Jul 14, 2014
When I restart my server all my domains opens at apache test page. Suspending and reactivating any domain fixes all domains.
View 4 Replies
View Related
Feb 18, 2007
I have download manager script that I use for my customers to download products right after the purchase.
Script generates download link that looks like this:
http://www.yourwebsite.com/download/...582921B&p=1840 (where 2YY6582921B is receipt number that is different with each purchase).
All products are placed in one folder. This folder can not be seen in above download url, but can be accessed thru browser and files can be downloaded that way without paying for them.
Can I use .htaccess and if yes how, to protect all product files the way that they can not be accessed directly by visiting url thru browser (in case somebody will find the correct url), they should be allowed for access only for my download manager script.
View 3 Replies
View Related
Nov 20, 2014
I have Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l (within xamp 1.7.3, on Windows 2008 R2) and several times a day I cannot access my websites while ftp, remote desktop, hmailserver is fine.
When I restart Apache it starts working immediately, but within a few seconds it goes back to no response stage.
View 1 Replies
View Related
Apr 22, 2014
I m trying to setup a reverse proxy with several site that will redirect the request into several internal server.I wanted to do that with several VirtualHost (like shown below). Unfortunatly whatever I type on my browser testsupport.xxxx.com or support2.xxxx.com I m redirected at the first of the config file (in the exemple http://10.253.12.41/.Is it the ServerName key that will redirect to the right proxypass ?
<VirtualHost *>
ServerName testsupport.xxxx.com
ProxyRequests Off
ProxyPass / http://10.253.12.41/
ProxyPassReverse / http://10.253.12.41/
</VirtualHost>
<VirtualHost *>
ServerName support2.xxxx.com
ProxyRequests Off
ProxyPass / http://10.253.11.31/
ProxyPassReverse / http://10.253.11.31/
</VirtualHost>
View 10 Replies
View Related