Apache Rewrite Rule for Mapping to index.php in Sub Folders
Below is an example URL structure with rewrite rules using an Apache .htaccess file. GET /a/ => a/index.php GET /a/b/ => a/b/index.php GET /a/b/c/ => a/b/index.php This URL mapping will give you pretty URLs in PHP without needing t...
Written by Sean Behan on 10/20/2017
Deploying Wordpress on Heroku
> This post is out of date - Heroku officially supports PHP now w/ buildpacks Heroku runs Apache version 2.2.22 PHP version 5.3.10 Deploying Wordpress to Heroku requires that you throw the Wordpress source into a Git repository. So download th...
Written by Sean Behan on 03/02/2017
Installing RedMine PM Software on Apache with Phusion and REE and Seeing a 404 Page Not Found Error on Installation
If you follow the instructions on how to install the Rails Redmine PM Software (available here) and are using Apache with Passenger (REE), you need to delete the .htaccess file that is kept in RAILS_ROOT/public directory. Otherwise you'll see a 404 page n...
Written by Sean Behan on 06/17/2012
Install and Serve a Rails Application from PHP Subdirectory Using Apache, Phussion Passenger and Ruby Enterprise Edition
Here is how to install a Rails application out of a subdirectory (rather than as a subdomain) with the Apache web server(Apache2). In this example I'm going to use my own blog which is a Wordpress installation and serve a Rails application from the subdir...
Written by Sean Behan on 06/17/2012
Mod_Python and Web.py on Ubuntu
Download First install mod_python for Apache and then restart/reload the server. apt-get install libapache2-mod-python /etc/init.d/apache2 force-reload apache2ctl restart Next grab the web.py framework from webpy.org. You can grab the tar or use easy_in...
Written by Sean Behan on 06/17/2012
Fun with Apache2 - httpd not running, trying to start (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down
Have you ever gotten this error message when trying to (re)start Apache httpd not running, trying to start (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down If you are running with ...
Written by Sean Behan on 06/17/2012
Deploy Sintra App on Ubuntu Using Apache2 and Phusion Passenger Module
Check it out http://sinatra.seanbehan.com/ This assumes Apache2 and the Phusion Passenger module have already been installed. If not you can get up to speed w/ this resource http://seanbehan.com/ruby-on-rails/new-ubuntu-slice-apache-mysql-php-ruby-on-rail...
Written by Sean Behan on 06/17/2012
Using sendmail to send mail on ubuntu box
I normally install postfix for my MTA. However, I've never really used sendmail so I'd decide to give it a whirl for a new application I'm working on. I don't use it for anything but handling the mail that the application needs to send out, like new user ...
Written by Sean Behan on 06/17/2012
Protect a Directory with Apache, .htaccess and httpasswd
Apache comes with a command line utility called "htpasswd". This utility will generate a username and password that you can use to authenticate against using a .htaccess file. Just run the utility like so: htpasswd -c /path/to/your/password/directory/a...
Written by Sean Behan on 06/17/2012
Dot htaccess file for wordpress installation (.htaccess)
Login to your wordpress installation and scroll to and click the second to last link set "Settings". You'll need to configure wordpress to handle your new links as "permalinks". Make a selection and copy the code into your .htaccess file. Wordpress will a...
Written by Sean Behan on 06/17/2012