First, get the current Apache distribution from Apache.org, and extract it: [root@srv-3 src]# ls apache_1.3.19.tar.gz bind-9.1.2 bind-9.1.2.tar.gz webmin-0.85.tar.gz [root@srv-3 src]# tar -xzf ap*.gz [root@srv-3 src]# [root@srv-3 src]# ls apache_1.3.19 bind-9.1.2 webmin-0.85.tar.gz apache_1.3.19.tar.gz bind-9.1.2.tar.gz [root@srv-3 src]# cd ap* [root@srv-3 apache_1.3.19]# ls ABOUT_APACHE config.layout INSTALL Makefile.tmpl src Announcement configure KEYS README WARNING-WIN.TXT cgi-bin htdocs LICENSE README.configure conf […]
Apache Installation and Configuration
Protecting your site from particular IP addresses w/ Apache
If a particular user is abusing your Apache web server, it is quite easy to deny access to your site. We found (with our ISP) that the easiest is to put an entry in the .htaccess file in the root of the directory you want to protect: deny from xxx.xxx.xxx.xxx Where xxx.xxx.xxx.xxx is the offending […]
Inserting program listings in PHP-Nuke
NetAdminTools used to use PHP-Nuke. For those of you who don’t know, PHP-Nuke is a fabulous Open Source project that gives you everything you need to bring up your own website with a database backend and other features. Now, one annoying thing with PHP-Nuke, and most web based interfaces is that it is quite difficult […]
Programming With PHP – Part 1
In this series of articles, we will explore the fundamentals of PHP programming with MySQL. For a good reference, try this book. It helped us. In this installment of Programming With PHP, we will set up the Red Hat RPMs, configure our directories, and code a simple “Hello World” app. We are running Red Hat […]
Programming With PHP – Part 2
In Part 1 of this series, we set up a basic PHP server with Apache on a Red Hat system, and wrote a simple “Hello World” script. In this article, we will vary content based on browser type. We will use the HTTP_SERVER_VARS server variable. The specific variable we want is HTTP_SERVER_VARS[‘HTTP_USER_AGENT’]. To use this, […]
Tidy Up Your HTML
One cool tool for tidying up your HTML, as well as notifying you of coding errors is TIDY. For an overview of what TIDY can do for you see this overview. Installation is quite easy: root@srv-1 src # tar -xzf tidy*.tgz root@srv-1 src # cd tidy root@srv-1 tidy # ls Makefile Makefile.bcc32 Makefile.nmake Makefile.vc6 console […]
Programming With PHP – Part 3
In this article we will pass a parameter to a PHP script via a URL, and we will get a little more sophisticated in our conditionals and regular expressions. One problem with accepting parameters is that there are often security issues. It is very important to ensure that the parameters passed by the user conform […]
Parsing Web Logs Into Calendar Text/Stats
We aren’t quite happy with the web stats software we use. The information is not brief enough. Mostly, we want to see the last couple months, with the weekends visible, and the unique hosts and pages viewed. Also, we have a lot of content that gets snagged that isn’t really what we consider a valid […]
Apache Tip – Take Clues Away from Bad Guys
Like the needy stranger who tells us his or her entire life story on the occassion of our first meeting, Apache spews out way too much information in every HTTP header. And like the unscrupulous sharpies who take advantage of lonely folks they meet on buses, there are those who would use this information to […]
Using Tab2space to Convert Tabs to Spaces in Source Code
We often need to convert source code into html format. We use the pre tag; however, the default tab values are to wide. For instance: this is one tab this is another If we were to put some of our funner source code up, it would push the right margin over too far. Well, we […]
Adding Modules to httpd.conf With Apache 2
We recently converted from a source version of Apache 2 to an RPM version. We wanted all of the PHP/MySQL stuff compiled in and working quickly. Yes, we were very lazy. Now, we tried to use our old httpd.conf file; however, since the compiled version had many of the options built in, our httpd.conf file […]
Upgrading Tomcat
In our article on installing Tomcat, we used version 5.0.18. Well, it has been awhile, and we want to upgrade our system. First, we download the new binary from here. On our system, we put this all in opt. Let’s remove the old symbolic link and extract the tarball: [root@srv-1 opt]# rm tomcat rm: remove […]
Compiling Java Telnet (jta25b)
There is an applet that can be used to serve up telnet sessions via a Java applet at Javatelnet.org. Note that this site is often down, although it is the current main site. There is an older version available here. Now, we have been trying to use this to provide a web interface for a […]
Setting up Initial Tomcat Administration
There are a couple web-based administration tools that come with Tomcat, but you have to set up the admin and manager access first. This is done by adding a line to tomcat-users.xml: [root@srv-1 conf]# pwd /opt/tomcat/conf [root@srv-1 conf]# vi tomcat-users.xml Add the line with admin,manager in it: <?xml version=’1.0′ encoding=’utf-8′?> <tomcat-users> <role rolename=”tomcat”/> <role rolename=”role1″/> […]
Having Fun With Forums and RedirectPermanent
One thing that is quite prevalent in forums is sharing images as postings or as avatars. We saw that our RoboCoop was getting some hits, and wondered what was up. Well, there is a forum that has a daily discussion in Texas here that had put up a link to the image of our chicken […]
Installing and Configuring the Java SDK
Grab the sdk from java.com. For us, we are going to install this on Lobstora, which is a GNU/Linux box. Just make the binary executable and run it: [root@srv-1 opt]# chmod 700 j2*.bin [root@srv-1 opt]# ./j2sdk-1_4_2_03-linux-i586.bin We like putting this in /opt with a symlink to j2sdk. [root@srv-1 opt]# ln -s j2sdk1.4.2_03 j2sdk [root@srv-1 opt]# […]
Installing Tomcat
Tomcat is part of the Apache Project. Tomcat, which is free and open-source, can serve up JavaServer Pages (JSP). For more info on this, see J2EE JavaServer Pages Technology. The JavaServer Pages FAQ is here. We were a bit lazy, and grabbed a binary from here. Make sure you have Java installed. We installed Java […]
Creating a JavaServer Pages Application
In this article we installed Tomcat so that we could serve JavaServer Pages (JSP). JSP is pretty easy to start off with, since you merely add the script parts to regular HTML, much like PHP. For instance, we could call this HTML hellow.jsp: <html> <body> Hello </body> </html> If we browse to our JSP server, […]
Customizing the Chrome Frame Image
It is possible to put background text on the frame of Chrome by creating a custom extension. Generally, I’m pretty conservative about browser themes, because too much noise makes it difficult to scan a page. The web is noisy enough as it is. I have a need to constantly look up some information that id […]
Getting Rid of WordPress Comments Off
Perhaps you can override this; however, if you want a quick hack to not display “Comments Off” on WordPress blogs that you don’t have comments on, find these lines in wp-includes/comment-template.php: if ( false === $zero ) $zero = __( ‘No Comments’ ); if ( false === $one ) $one = __( ‘1 Comment’ ); […]