a:2:{i:0;a:1:{s:4:"data";a:2:{s:7:"entries";a:10:{i:0;a:6:{s:5:"title";s:45:"Creating Multiple Sites on a Local Web Server";s:4:"slug";s:45:"creating-multiple-sites-on-a-local-web-server";s:2:"id";s:3:"258";s:10:"typeHandle";s:4:"blog";s:4:"body";s:2917:"

So while I was redesigning my site, I needed somewhere to develop the new design. I didn’t want to have to setup a sub-domain on the live site because that would be a pain to have to FTP files up everytime I changed something. So I installed XAMPP on my computer.

Basically, XAMPP is a all in one Apache web server. It installs Apache, PHP, MySQL…everything I needed.

Once you install it, you get a web directory here C:Program Filesxampphtdocs (or whichever directory you install XAMPP to). That’s great, everything works fine when you put things in that directory and browse to localhost. But what about if you want to setup multiple sites? That is where I really had to do some digging.

Setting Up Multiple Sites

I found this really good article that walks you through setting up multiple sites on XAMPP. The article was a little longer than I thought it had to be, so I thought I would clarify some things.

  1. Find this file: C:Program Filesxamppapacheconfextrahttpd-vhosts.conf, and open it in notepad.
  2. Find a line that says something like NameVirtualHost *:80. Remove the # sign that you see in front of it; this turns it from being a comment to code that is actually executed. (This was not in any instructions I could find)
  3. Next, scroll to the bottom, and you can add multiple domains. Here is what mine looks like:

    <VirtualHost *:80>
    ServerAdmin webmaster@localhost.trevordavis.dev
    DocumentRoot "C:/sites/trevordavis.dev/webpages"
    ServerName localhost.trevordavis.dev
    </VirtualHost>

    <VirtualHost *:80>
    ServerAdmin webmaster@localhost.trevordavis.redesign
    DocumentRoot "C:/sites/trevordavis.redesign/webpages"
    ServerName localhost.trevordavis.redesign
    </VirtualHost> 
  4. Finally, find this file: C:WINDOWSsystem32driversetchosts and open it in notepad. You need to add an entry for each site you setup in the httpd-vhosts.conf file. My file looks like this:

    127.0.0.1 localhost
    127.0.0.1 localhost.trevordavis.dev
    127.0.0.1 localhost.trevordavis.redesign 

That’s It

Once you have done this you can browse to http://localhost.trevordavis.dev and http://localhost.trevordavis.redesign on your computer when you have your web server running. This means that you can view PHP files and execute SQL locally.

It’s great.

Let me know if you have any questions.

";s:10:"bodyBlocks";a:0:{}}i:1;a:6:{s:5:"title";s:27:"Version 2 Redesign Launched";s:4:"slug";s:27:"version-2-redesign-launched";s:2:"id";s:3:"259";s:10:"typeHandle";s:4:"blog";s:4:"body";s:999:"

Finally, I launched my redesign. I still have a little bit of cleanup to do in the blog section, but Sunday night football is on, so that’s not going to happen tonight.

The goal for this redesign was to simplify. I’m only using a couple of images, and sticking to a pretty strict grid. I would say the inspiration for this redesign is definitely Khoi Vinh.

So the headings (or at least most of them) are done using sIFR. I’m pulling in my Twitter status next to my logo. I’ve got my Flickr photos, Ma.gnolia bookmarks, and Amazon Astore in the footer.

Let me know if you have any feedback. Hopefully I will be able to clean up some of the blog stuff tomorrow or Tuesday.

";s:10:"bodyBlocks";a:0:{}}i:2;a:6:{s:5:"title";s:23:"Weekly Link Round-Up #8";s:4:"slug";s:22:"weekly-link-round-up-8";s:2:"id";s:3:"260";s:10:"typeHandle";s:4:"blog";s:4:"body";s:3464:"

I’ve been busy for the last week or so working on the new site design. Hopefully I’m going to launch it within the next few days…maybe even tonight. I would say the theme for this redesign is simplicity. I’m no designer, so I should stop pretending, right? A lot of good links from this week. I guess once I finally finish the redesign, a real article will come…I promise.

";s:10:"bodyBlocks";a:0:{}}i:3;a:6:{s:5:"title";s:23:"Weekly Link Round-Up #7";s:4:"slug";s:22:"weekly-link-round-up-7";s:2:"id";s:3:"261";s:10:"typeHandle";s:4:"blog";s:4:"body";s:2696:"

After a nice short week, and 2 days of eating and football, time to share my links for the week. This collection is only until Wednesday, but I still found a bunch of interesting things.

";s:10:"bodyBlocks";a:0:{}}i:4;a:6:{s:5:"title";s:27:"Upgraded to Wordpress 2.3.1";s:4:"slug";s:27:"upgraded-to-wordpress-2.3.1";s:2:"id";s:3:"262";s:10:"typeHandle";s:4:"blog";s:4:"body";s:691:"

I decided to upgrade to the new version of Wordpress tonight. I wanted to get that out of the way before I finish and launch the redesigned site. The upgrade went smoothly, just noticed a couple of issues.

The display of my comments got a little wacky. I’m not sure what exactly happened, but I’m not gonna worry about it too much since the redesign is launching soon.

Also, it broke my AJAX comment submit. I have disabled it for now, but there is a new input element with the name of _wp_unfiltered_html_comment. I tried changing the JavaScript, but I still couldn’t get it to work. Hopefully, it’s something I can address soon.

";s:10:"bodyBlocks";a:0:{}}i:5;a:6:{s:5:"title";s:23:"Weekly Link Round-Up #6";s:4:"slug";s:22:"weekly-link-round-up-6";s:2:"id";s:3:"263";s:10:"typeHandle";s:4:"blog";s:4:"body";s:2142:"

Finally, it’s the weekend. I had to work basically all last weekend, and it’s great to finally get a break. Got a pretty good collection of links for this week.

I promise a real post is coming soon! Along with a redesign…sometime soon.

";s:10:"bodyBlocks";a:0:{}}i:6;a:6:{s:5:"title";s:23:"Weekly Link Round-Up #5";s:4:"slug";s:22:"weekly-link-round-up-5";s:2:"id";s:3:"264";s:10:"typeHandle";s:4:"blog";s:4:"body";s:1793:"

Wow, I’m pathetic. I can hardly keep up with one blog post a week. I’m just so busy at work right now. I stopped reading my RSS feeds on Wednesday, so this is really like half-a-week’s worth of links.

I’ve got a big project for work launching on Sunday, so hopefully I will have more free time. I’m also in the process of working up a new design for the site. I don’t necessarily feel like the current design is not good; I just feel the need for a change.

";s:10:"bodyBlocks";a:0:{}}i:7;a:6:{s:5:"title";s:23:"Weekly Link Round-Up #4";s:4:"slug";s:22:"weekly-link-round-up-4";s:2:"id";s:3:"265";s:10:"typeHandle";s:4:"blog";s:4:"body";s:1609:"

I didn’t read too many great things this week, but there were a few. A couple of them are a little of topic, but I still found them really interesting to read.

";s:10:"bodyBlocks";a:0:{}}i:8;a:6:{s:5:"title";s:23:"Weekly Link Round-Up #3";s:4:"slug";s:22:"weekly-link-round-up-3";s:2:"id";s:3:"266";s:10:"typeHandle";s:4:"blog";s:4:"body";s:2079:"

Yeah, so I missed last week. What can I say, I was moving into my condo! I almost missed this week too…I got my wisdom teeth pulled this morning. But hey, I felt basically back to normal by about 2 this afternoon. So here’s what I found interesting this week.

";s:10:"bodyBlocks";a:0:{}}i:9;a:6:{s:5:"title";s:23:"Weekly Link Round-Up #2";s:4:"slug";s:22:"weekly-link-round-up-2";s:2:"id";s:3:"267";s:10:"typeHandle";s:4:"blog";s:4:"body";s:2541:"

Ok, so Fridays it is. I guess there are pros to posting this on Friday evening. There is plenty of time on the weekends to browse and read articles. Or if you aren’t a weekend reader, they will be waiting in your RSS Reader on Monday morning. Sounds good to me. Just a few good links from this week:

";s:10:"bodyBlocks";a:0:{}}}s:5:"total";i:270;}}i:1;O:25:"yii\caching\TagDependency":3:{s:4:"tags";a:4:{i:0;s:7:"element";i:1;s:29:"element::craft\elements\Entry";i:2;s:40:"element::craft\elements\Entry::section:4";i:3;s:7:"graphql";}s:4:"data";a:4:{s:40:"CraftCMSce35088bdfe0816226cd17fd051a4803";s:21:"0.46162700 1707493692";s:40:"CraftCMS2743a789e8993267a348eee1ee7e4450";s:21:"0.34758900 1706282441";s:40:"CraftCMS2ac34726f299f7e18e449d8e536c67f8";s:21:"0.22771600 1711953912";s:40:"CraftCMS3817d4a648fcfac939af46605323feb0";s:21:"0.44505500 1681499442";}s:8:"reusable";b:0;}}