The Squid is a good proxy server. Its configuration is very simple. Please use the following procedures.
1) Most of the standard distributions have squid packages in its repository. If you are using fedora, RHEL or centos please do the following procedurea
# yum install squid -y
If your in debian or Ubundu please use the following,
# apt-get install squid
2) Now open the squid configuration file “squid.conf” . In general it will be in /etc/squid/squid.conf . Now modify/ add the following lines.
visible_hostname machine-name
http_port 3128
cache_dir ufs /var/spool/squid 1000 16 256
access_log /var/log/squid/access.log squid
3) Now add the following in the acl section.
acl our_networks src xxx.xxx.xxx.xxx/xx
http_access allow our_networks
Here the xxx.xxx.xxx.xxx/xx is your local IP /netmask
4) Now start the squid server
# /etc/rc.d/init.d/squid start
5) Now configure your web browser as follows. ( It is my firefox configuration )
Go to Preferences -> connection settings -> manual Proxy configurations
Now configure your proxy server IP and port ( 3128)
Now click Ok.
This is the most simplest proxy server configurations over network.
Note : Please check the log file /var/log/squid/access.log for any errors
Popularity: 5%
Tomcat Virtual hosting in Unix
The tomcat virtual hosting configuration in Unix/Linux is simple.
1) Create the virtual host entry in server.xml
2) Create the document root
3) Restart tomcat
let us consider the tomcat installation root is /usr/local/tomcat
To start the tomcat use /usr/local/tomcat/bin/start.sh
To stop the tomcat use /usr/loca/tomcat/bin/shutdown.sh
The following is my server.xml. Please copy paste and change the domain.com
====================================
# more conf/server.xml
<?xml version=”1.0″ encoding=”UTF-8″?>
<Server>
<Listener className=”org.apache.catalina.core.AprLifecycleListener”/>
<Listener className=”org.apache.catalina.mbeans.GlobalResourcesLifecycleListener”/>
<Listener className=”org.apache.catalina.storeconfig.StoreConfigLifecycleListener”/>
<Listener className=”org.apache.catalina.mbeans.ServerLifecycleListener”/>
<GlobalNamingResources>
<Environment
name=”simpleValue”
type=”java.lang.Integer”
value=”30″/>
<Resource
auth=”Container”
description=”User database that can be updated and saved”
name=”UserDatabase”
type=”org.apache.catalina.UserDatabase”
pathname=”conf/tomcat-users.xml”
factory=”org.apache.catalina.users.MemoryUserDatabaseFactory”/>
</GlobalNamingResources>
<Service
name=”Catalina”>
<Connector
port=”80″
redirectPort=”8443″
minSpareThreads=”25″
connectionTimeout=”20000″
maxSpareThreads=”75″
maxThreads=”150″>
</Connector>
<Connector
port=”8009″
redirectPort=”8443″
protocol=”AJP/1.3″>
</Connector>
<Engine
defaultHost=”localhost”
name=”Catalina”>
<Realm className=”org.apache.catalina.realm.UserDatabaseRealm”/>
<Host
appBase=”mydomain”
name=”mydomain.com”>
<Context path=”" docBase=”.”/>
<Alias>www.mydomain.com</Alias>
</Host>
<Host
appBase=”webapps”
name=”localhost”>
</Host>
</Engine>
</Service>
</Server>
============================
Now create the document root “/usr/local/tomcat/mydomain” and directory structure as follows
# mkdir -p /usr/local/tomcat/mydomain/{WEB-INF/{classes,lib},META-INF}
Create a test index.jsp file in here ,
# cat > /usr/local/tomcat/mydomain/index.jsp << EOF
<%@page contentType=”text/html” pageEncoding=”UTF-8″%>
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”
“http://www.w3.org/TR/html4/loose.dtd”>
<html>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″>
<title>Centropoly</title>
</head>
<body>
<h2>Welcome to the temporary home of mydomain.com.</h2>
<p>
Just for testing
</p>
</body>
</html>
EOF
This is all about simple virtual hosting in tomcat. I testes the above configuration successfully in Tomcat 5
Any comments
Popularity: 1%
I Have recently faced a serious problem with my Original website , sherin.in. My DNS registrar is suspended it without a notice, because IT was expired on March 20th 2009. I contacted them for getting back, but they asking 5000 Rs for this domain, which I can’t afford it.
So all projects related with sherin.in will not work properly because some of it using the mirror site as sherin.in . It is mainly affected by the project ffmpeginstaller. I am updating content of my old website to this new site.
SO for the ffmpeginstaller issue, I have moved the project with Sharemixer community. You can download it from new website, http://www.ffmpeginstaller.com/ . Also please notice I only modified the latest version of script ( version 3. 2. 1) .
I also moved the forum to forum.ffmpeginstaller.com . Alaso added new two Professional service plan one for 49$ ad another one for 150$.
In 49$ package, I will install the complete ffmpeg package in your server. So you don’t need to worry about it.
In 150$ package you will get my installation service , OS hardening apache/php/mysql optimization and performance tuning.
I am apologizing for all the troubles cased by my DNS issues.
20th May 2009
Sherinmon
Popularity: 4%
IN cpanel servers suphp is a good choice. But you may get a 500 internal server error some times
You can’t see any error logs in server, In such situation check the logs files size in /usr/local/apache/logs specially /usr/local/apache/logs/suphp_log , It must have size more than 2.0 GB.
So this seems to be a bug in suphp , eventhough we chosing apache version 2.2.x ., because apache 2.2.x have larger file size handling method. BUt still suphp in old age .
Let me open a bug report in suphp.org
Popularity: 1%