CHEATSHEET Add More Domains with Nginx: VPS BIBLE




new password?
login
X

Add Web Sites Nginx Cheatsheet

website file structure image

Create additional sites & blogs quickly & easily. After creating the DNS entries, just add a vhost file, its symlink, restart Nginx and go play.

OK. So I did this guide already, already! But as this is one of the main things people do with a VPS – adding extra domains – I figured it wouldn’t hurt to provide a shortcut cheatsheet too, minus the blarney.

This tutorial presumes you have already set up a site or blog with the VPS Bible, and therefore have already enabled FastCGI and, for WordPress, the required FURL & caching scripts. If not, check out the Ubuntu-Nginx VPS Bible index, which isn’t hard to find.

Otherwise, just substitute “mydomain.com” for your_domain.tld throughout this how-to, and “USERNAME” for your VPS user.

If you do want the detail, the why’s, the where’s, the wherefore’s, then read Serve Multiple Sites & Blogs with Virtual Hosts.

Setup Unmanaged VPS: The Ubuntu-Nginx Guide

Take your virtual private server from zero to hero

  .. from blank box to cute-as server ..  

with this easy-to-follow copy/paste guide.

22+ parts with video, here’s the index.

Create DNS Records

Add the DNS settings as explained in Add a Domain Zone to Your VPS.

Add Site Directory Structure

At the terminal, type:-


Please sign up for automatic premium content access.

Just $15/year* will save you hours, maybe days!

Alternatively, the vpsBible forum is free and you are welcome.

Create a Temporary Homepage (optional)

You don’t have to bother with this, but I guess some folks will find it handy.

Type:-


Please sign up for automatic premium content access.

Just $15/year* will save you hours, maybe days!

Alternatively, the vpsBible forum is free and you are welcome.

.. hit return and paste:-


Please sign up for automatic premium content access.

Just $15/year* will save you hours, maybe days!

Alternatively, the vpsBible forum is free and you are welcome.

Add Virtual Host (vhost) with FastCGI, FURL Support & Optional WordPress Caching

Type this:-


Please sign up for automatic premium content access.

Just $15/year* will save you hours, maybe days!

Alternatively, the vpsBible forum is free and you are welcome.

Return and paste this:-


Please sign up for automatic premium content access.

Just $15/year* will save you hours, maybe days!

Alternatively, the vpsBible forum is free and you are welcome.

Option: If you don’t use WordPress with this site, delete the following lines from the above:-


Please sign up for automatic premium content access.

Just $15/year* will save you hours, maybe days!

Alternatively, the vpsBible forum is free and you are welcome.

Option: If you do want WordPress, and want both pretty permalinks and WP Super Caching support, leave the above, as is.

Option: If you do want WordPress, and want pretty permalinks but not WP Super Caching, swap this:-


Please sign up for automatic premium content access.

Just $15/year* will save you hours, maybe days!

Alternatively, the vpsBible forum is free and you are welcome.

.. for this :-


Please sign up for automatic premium content access.

Just $15/year* will save you hours, maybe days!

Alternatively, the vpsBible forum is free and you are welcome.

Save the file.

Create the Symlink and Restart Nginx

Paste this into the terminal:-


Please sign up for automatic premium content access.

Just $15/year* will save you hours, maybe days!

Alternatively, the vpsBible forum is free and you are welcome.

And reboot the web server by typing ..


Please sign up for automatic premium content access.

Just $15/year* will save you hours, maybe days!

Alternatively, the vpsBible forum is free and you are welcome.

.. Or if you followed Edit bashrc for User-Friendly Linux, plus System Updates, just type:-


Please sign up for automatic premium content access.

Just $15/year* will save you hours, maybe days!

Alternatively, the vpsBible forum is free and you are welcome.

Upload your new domain’s site files and go check it. If you’re relocating an existing site, you should read Moving Day! How to Move Your Blog or Site.

Setup Unmanaged VPS: The Ubuntu-Nginx Guide

Take your virtual private server from zero to hero

with this easy-to-follow copy/paste guide.

“My local PC runs Windows” Show me for Linux

22+ parts with video, here’s the index ..

Manage Unmanaged VPS: Ubuntu-Nginx Administration

Already set it up? We’d best maintain it then.

Toggle to the ..  Ubuntu-Nginx Admin Index

Manage Unmanaged VPS: Ubuntu-Nginx Administration

Maintain your virtual private server with ..

.. cheatsheets, tutorials, tips & guides.

Head back to the ..  Ubuntu-Nginx Installation Index

Nginx Admin: In the Works ..

This lot’s marked for addition already:-

  • Setup or Edit DNS using Bind
  • Network Tools Troubleshooting Guide
  • The Comprehensive Permissions Guide
  • Configuring Nginx Rewrites
  • Custom Website Error Page
  • Setting up Cron Jobs
  • Rsync for Incremental Remote-to-Local Backup
  • Cron & Rsync for Automatic Backup
  • Cron & mysqldump for Auto DB Backup
  • Safeguard Bandwidth with Hotlink Protection
  • Block Access with Nginx’ IP Deny



Got a Question? Want to Comment?

This site has no comments system. We've got a better system!

Please use the link at the top of the post and goto this topic's forum thread:-

  • to help build community
  • for a superior knowledge base
  • to keep info in one place, not diluted between forum & comments.

For those posts ported from Guvnr.com (pre-Feb/2010), archive comments remain.

Handy info from these comments is in the process of being ported to the forum and attributed to the original author.

If you think this idea sucks, let me know.

Thank you.