Using Nginx and Apache together on Ubuntu

Apache, Django, Magento, Nginx, Ubuntu, Wordpress

I am beginning a new project that uses MEAN.JS (MongoDB, ExpressJS, AngularJS, Node.js). I use Apache as my webserver on my local Ubuntu VM. When I first read about using Express, I wondered how I would use Express and Apache together. Further confusion came when I learned that my host provider (webfaction uses Nginx to serve static files and Apache for PHP and other server-side technologies. So Node.js and Express will actually be running under Nginx. Because I wanted my development environment to be enulate production as much as possible, I decided to run Nginx and Apache together.

Continue reading

Checkout My New Site - T-shirts For Geeks

WordPress: Sharing database content between primary and sub-domains


After I created my mobile WordPress theme using the the Mobile Theme Generator that I created on, I had to figure out the best way to share the database between my primary domain and the mobile sub-domain ( There are a couple of strategies for switching between a desktop view and a mobile view. I decided that I didn’t want to do an automatic switch to the mobile sub-domain by using a mobile device sniffing method. I think that it is a better strategy to let the user decide whether they want to switch to a mobile view. So I set up a sub-domain and created a link at the top of my site that points to my mobile view.

Continue reading

Checkout My New Site - T-shirts For Geeks

WordPress Editor: Writing Code

Pebblet, Wordpress

When creating posts using WordPress, I often switch between the Visual and HTML editors. I write a lot of code in my posts (using the pre tag and the CodeBox plugin).

Unfortunately, when I switch back to the Visual editor, WordPress changes my code. Although, the code is wrapped in a pre tag, the visual editor will still change or remove code. For instance, If I add ‘ < script > ‘ to my page, I had to resort to writing < script >, so the visual editor does not change it.

It recently occurred to me that if I create a post with a lot of code, rather than trying to trick the Visual editor, I remain in the HTML editor and never switch back into the Visual editor before I publish.

I hope this helps someone else writing code using WordPress.

Checkout My New Site - T-shirts For Geeks