Grokbase
Topics Posts Groups | in
x
[ help ]

badaboom003...@dont-contact.us (badaboom003...@dont-contact.us)

Profile | Posts (1)

User Information

Display Name:badaboom003...@dont-contact.us
Partial Email Address:badaboom003...@dont-contact.us
Posts:
1 total
1 in Squid

1 Most Recent Post

1) badaboom003...@dont-contact.us [squid-users] Squid breaks Apache mod_rewrite for canonical hostnames
| +1 vote
I'm running an Ubuntu LAMP server with standard configuration. I have the following lines in my...
Squid
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
I'm running an Ubuntu LAMP server with standard
configuration. I have the following lines in my
.htaccess file for mod_rewrite (domain name changed):

Options Includes ExecCGI +Indexes +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^mysite\.com [NC]
RewriteRule ^(.*) http://www.mysite.com/$1 [R=301,L]

It works just fine.

I then set up Squid 2.6 as an accelerator on the same
machine. It also works.

However, it breaks my mod_rewrite. it treats
mysite.com and www.mysite.com as 2 different sites (in
fact, asking for basic web authentication again with
each one).

I set up squid with standard configuration. below are
the only lines i added in squid.conf. The lines were
added in the appropriate places.

Any help would be greatly appreciated. thanks.

(IP address is x'd out)

----------------------------
http_port xxx.xxx.xxx.xxx:80
defaultsite=www.mysite.com

cache_peer 127.0.0.1 parent 80 0 no-query originserver
login=PASS

visible_hostname www.mysite.com

acl port80 port 80

http_access allow port80
----------------------------

spacer
Profile | Posts (1)
Home > People > badaboom003...@dont-contact.us