Joomla 1.5 + lighttpd and squid reverve proxy

Posted: July 2, 2009 in archlinux, Debian, Slackware

mod_rewrite for joomla 1.5 using lighttpd

pico /etc/lighttpd/conf-enabled/10-rewrite.conf

url.rewrite-once = (“/component/content,(.*)/$”=>
“/index.php?content=$1”)

if you are using http://xxx.com/joomla

use this

url.rewrite-once = (“joomla/component/content,(.*)/$”=>
“/joomla/index.php?content=$1”)

and done forget to enable mod_rewrite in lighttpd.conf

and change error 404 to this

server.error-handler-404 = "/index.php"

and running lighttpd on 127.0.0.1

SQUID REVERSE PROXY

aptitude install squid

than change squid.conf to be like this

——————————-cut here ——————————

http_port xxx.xxx.xxx.xxx:80 vhost vport defaultsite=DOMAIN
cache_peer 127.0.0.1 parent 80 0 no-query originserver
icp_port 0
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_mem 32 MB
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 # https
acl Safe_ports port 80 # http
acl Safe_ports port 443 # https
acl Safe_ports port 1025-65535 # unregistered ports

################# administrator in joomla ###############
acl QUERY urlpath_regex /administrator/ /84/$
cache deny QUERY

acl purge method PURGE
acl CONNECT method CONNECT
cache_dir ufs /var/spool/squid 200 16 256
emulate_httpd_log on
redirect_rewrites_host_header off
acl all src 0.0.0.0/0.0.0.0
http_access allow all
cache_mgr admin@YOURDOMAIN
cache_effective_user proxy
cache_effective_group proxy
#cache_peer_access allow all
log_icp_queries off
cachemgr_passwd YOURPASSWORD all
buffered_logs on
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
maximum_object_size_in_memory 1 MB
logformat combined %>a %ui %un [%tl] “%rm %ru HTTP/%rv” %Hs %<st “%{Referer}>h” “%{User-Agent}>h” %Ss:%Sh
#emulate_apache_log on
collapsed_forwarding on
vary_ignore_expire on
maximum_object_size 4194304 bytes
minimum_object_size 0 bytes
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
################# extra ####################
refresh_pattern . 0 20% 15 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.xml$ 10080 150% 40320 reload-into-ims
refresh_pattern -i \.js$ 10080 150% 40320 reload-into-ims
refresh_pattern -i \.css$ 10080 150% 40320 reload-into-ims
refresh_pattern -i \.jpg$ 10080 150% 40320 reload-into-ims
refresh_pattern -i \.png$ 10080 150% 40320 reload-into-ims
refresh_pattern -i \.gif$ 10080 300% 40320 reload-into-ims
refresh_pattern -i \.txt$ 1440 100% 20160 reload-into-ims override-lastmod
negative_ttl 1 minutes
positive_dns_ttl 15 hours
negative_dns_ttl 1 minutes
half_closed_clients off
access_log /var/log/squid/access.log squid
forwarded_for on
reload_into_ims on
#refresh_stale_hit 300 seconds
ie_refresh on
#follow_x_forwarded_for allow all
visible_hostname YOURHOSTNAME
——————————-cut here ——————————

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s