Topic “Apache”

Apache: Allowing access to subpaths

Its a tricky one.

Seems this is always a tricky one that I run into when setting up a new test site. If you want to lock down the entire site behind a password, but need to allow some unauthenticated requests for external integration, then have a look at the solution below. It uses SetEnvIf to open up access to selected paths. This should work too, if your route most requests through a front controller script using a rewrite rule.

Tags:

Link: Nginx Hacking Tips

This is a good overview of common configurations comparing nginx's syntax to apache's.  Once you get used to it, I think nginx syntax is easier to understand, and it reads more like an actual script or program.  I've been using nginx to host SoccerBlogs.net for 3 months now and its been very solid.  In fact, it coupled with moving mysql to its own slice, forced me to focus some attention on SQL query bottlenecks.

Using RewriteMap for many URL redirects.

Migrating platforms can lead to broken links on your website.  If you've cultivated links from other sites or if search engines send a lot of visitors your way, you'll want to redirect users from the old links to the new.  Many content management systems have facilities for manually maintaining redirects, but you can also do this with Apache.  The big benefit of using Apache is that such visitors won't hit your CMS until they get to the correct page.

Tags: ,

Thinking of switch to PHP w/Fast CGI?

If you're contemplating switching to running PHP5 under FastCGI, to take advantage of apache's threaded worker model and improve your server's performance, think again.  If you're used to setting and overriding php values via .htaccess files or using php_value/php_flag in your virtual host directory, this is not supported with FastCGI.  You'll have to figure out how to set those values via some other means.  Some PHP ini directives can be set in your script directly, with ini_set, but others have to be set outside of it (register_globals for example).  There are ways to

Tags: ,

Don't abuse PHP's header function for redirects

PHP's Header function can come in quite handy when you're building your next greate web application.  Its powerful, but as a result, its tempting to misuse it to do even the simplest things, like permanent redirects.  Usually, its done like this:

Tags: ,

Fixing Subversion Propfind 403 errors

I've been using Subversion heavily lately to keep my live and development sites synchronized and its been a huge productivity booster.  I had to move some code over to a lite site for work this evening and it was such a pain, because I had to go through and figure out the files I needed to copy.  With svn, or even cvs, I could use tags and then an update and let the computer do the grunt work.  Instead it was a 15 minute task and i broke the site twice due to missing dependencies.

Fail2Ban + Mod_Security = Spammer Bouncer

Under debian, fail2ban's configuration is in /etc/fail2ban/.  In the filter.d directory add the following file and name it apache-modsec.conf.

Google Calendar Launches

Google Calendar has launched if you want to check it out. There is also an overview of the features available. Will this be a compelling calendaring solution? After looking it over and checking out the website, I think it might be for me. I've setup DAV on apache before so that I can have a portable read/write calendar available online but it hasn't become critical for me.

Pointers: running your own mail server

There are a bunch of reasons why you might decide that running your own mail server is something you want to do. You have a lot of free time and enjoy spending a lot of time at the command line reading howto guides and installation manuals. Hopefully, you know you are running a mail server and don't have a Windows machine that's been turned into a spam zombie.

PHP File Uploads

Yesterday at work I spent the better part of the afternoon trying to figure out why a form couldn't handle multiple file uploads. These uploads where failry big - quicktime and wmv files - so I thought the culprit was the large file size. But the script was not returning any error warnings or notices which made it quite a pain to debug. With a co-workers help we traced it to two settings in php.ini.

Tags: ,

Recent Comments

Subscribe by Email

Enter your email address:

Delivered by FeedBurner