Gentoo Archives: gentoo-user

From: Peter Humphrey <peter@××××××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Apache server setup
Date: Fri, 08 Jun 2012 18:22:47
Message-Id: 201206081921.07465.peter@humphrey.ukfsn.org
In Reply to: Re: [gentoo-user] Apache server setup by Paul Hartman
1 On Friday 08 June 2012 18:19:10 Paul Hartman wrote:
2
3 > What version are you on? Are both servers running the same version?
4
5 The remote server is 2.2.20 and I'm on 2.2.22-r1
6
7 > See here for the upgrade guide:
8 > https://httpd.apache.org/docs/2.4/upgrading.html
9
10 Useful for later, when I need to - thanks.
11
12 > The most confusing/frustrating thing with Apache and trying to Google
13 > for information is that the configuration changes so much from one
14 > version to another, and often times the article doesn't mention which
15 > specific version they are talking about (I still encounter a lot of
16 > tutorials from Apache 1.x). There are also differences depending on
17 > whether you're using virtual hosts or not, chroots, distro-specific
18 > stuff like webapp-config.
19
20 No virtual hosts, chroots or any complicating factor that I can think
21 of. Webapp-config is installed here but I haven't used it.
22
23 When I rsync'd my site to /var/www/localhost/htdocs on the local server,
24 Apache wouldn't display any images, saying that I didn't have
25 permission. All files had the same ownership so something must be awry in
26 the server config. So I moved the site from there to ~/public_html where
27 it works properly apart from the included file I mentioned.
28
29 On second thoughts, I see the .htaccess file, which was missing from the
30 local server, has a rewrite rule referring to images. Does that explain
31 this problem?
32
33 > If you want help with the specific error I would suggest posting the
34 > contents of the .htaccess file and which version of Apache you're
35 > using.
36
37 Right, thanks! Sorry about the word-wrap.
38
39 $ cat .htaccess
40 RewriteEngine on
41
42 RewriteCond %{HTTP_REFERER} !^http://tideswellmvc.co.uk/.*$ [NC]
43 RewriteCond %{HTTP_REFERER} !^http://tideswellmvc.co.uk$ [NC]
44 RewriteCond %{HTTP_REFERER} !^http://www.tideswellmvc.co.uk/.*$
45 [NC]
46 RewriteCond %{HTTP_REFERER} !^http://www.tideswellmvc.co.uk$ [NC]
47 RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]
48
49 Options +Includes
50 $
51
52 --
53 Rgds
54 Peter

Replies

Subject Author
Re: [gentoo-user] Apache server setup Paul Hartman <paul.hartman+gentoo@×××××.com>