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.

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.


* €11 + 16% sales tax, or precisely €12.76! .. Hey, a few beers then.

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.


* €11 + 16% sales tax, or precisely €12.76! .. Hey, a few beers then.

.. 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.


* €11 + 16% sales tax, or precisely €12.76! .. Hey, a few beers then.

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.


* €11 + 16% sales tax, or precisely €12.76! .. Hey, a few beers then.

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.


* €11 + 16% sales tax, or precisely €12.76! .. Hey, a few beers then.

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.


* €11 + 16% sales tax, or precisely €12.76! .. Hey, a few beers then.

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.


* €11 + 16% sales tax, or precisely €12.76! .. Hey, a few beers then.

.. 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.


* €11 + 16% sales tax, or precisely €12.76! .. Hey, a few beers then.

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.


* €11 + 16% sales tax, or precisely €12.76! .. Hey, a few beers then.

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.


* €11 + 16% sales tax, or precisely €12.76! .. Hey, a few beers then.

.. 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.


* €11 + 16% sales tax, or precisely €12.76! .. Hey, a few beers then.

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 ..

  • Appendix 1a: Nginx Control Panel

    You’re migrating shared-to-VPS and want a GUI like cPanel? No you don’t, not after you read this! What’s more, you don’t need one either.

  • Appendix 1b: Nginx Control Panel Workarounds

    For every control panel module there’s an equivalent terminal command. They’re all linked from here so, hey, no excuses!

  • Appendix 2: Add Web Sites Nginx Cheatsheet

    Once you’ve set up your first site, adding more gets easier. Especially when you can refer to this. (Let’s face it, I’m just too good to you.)




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.