Question

Can I host both Wordpress and non-Wordpress sites on the same VPS?

I am a front end designer and I have very little experience with how to host a website. I somehow stumbled through the console and FTP clients and got a few websites up and running but I want to create a proper infrastructure so I can easily get my sites up in the future.

Anyways, my question is, (how) can I host multiple websites with different and/or no CMS on one server?

Subscribe
Share

Instead of spending time on learning about servers you could try ServerPilot which installs with a single command and lets you manage websites from a web interface.

Thanks jesin! Checked it out, saw a couple videos. Seems incredibly intuitive, fast and organised. Will definitely give it a shot. :)


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

@jasjitsm I am so sorry. Maybe my Tutorial was a bit confusing. So I decided to create a new one. The new one has a better style and is much easier to understand as it are just pictures with a better resolution (step by step). Now you just need to type the same commands as I have done.

Download the Tutorial (.zip file)

Hello,

I created a Tutorial.

Just one note, I wanted to make it easy as possible, so 99% are just Pictures :-).

The Tutorial. 36h available :-(

If you want, i may create a snapshot and transfer it to you. I just need your E-Mail address. It is even possible to create a text-version or video if you want

@jasjitsm

  1. You don’t need to create rules, “server_name example.com;” is enough.

  2. Just download and extract WordPress. Create a MySQL Database. Open your Browser (with Domain !!!) and follow the Installation Guide.

PS: If you don’t know how to create a MySQL Database just ask and I create a Tutorial (complete install of WordPress) for you (with Pictures)

So here you go. We are going to use Ubuntu and Nginx

##Install the Software

sudo apt-get update
sudo apt-get install mysql-server php5-mysql nginx php5-fpm

##File Structure

mkdir /var/www/html/domain1
mkdir /var/www/html/domain2

##Nginx Configuration

Domain1

sudo nano /etc/nginx/sites-available/domain1

Copy and paste this

server {
        listen   80;
     

        root /var/www/html/domain1;
        index index.php index.html index.htm;

        server_name example.com;

        location / {
                try_files $uri $uri/ /index.html;
        }

        # pass the PHP scripts to FastCGI server listening on the php-fpm socket
        location ~ \.php$ {
                try_files $uri =404;
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include fastcgi_params;
                
        }

}

save it

Domain2

sudo nano /etc/nginx/sites-available/domain2
server {
        listen   80;
     

        root /var/www/html/domain2;
        index index.php index.html index.htm;

        server_name example.com;

        location / {
                try_files $uri $uri/ /index.html;
        }

        # pass the PHP scripts to FastCGI server listening on the php-fpm socket
        location ~ \.php$ {
                try_files $uri =404;
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include fastcgi_params;
                
        }

}

save it

##The last Step

sudo ln -s /etc/nginx/sites-available/domain1 /etc/nginx/sites-enabled/
sudo ln -s /etc/nginx/sites-available/domain2 /etc/nginx/sites-enabled/

Why Nginx ?

  • It is much faster
  • Easy to manage

PS: If it works click that hearth to show me some love

Hello and welcome to DigitalOcean.

You can host different websites on one Droplet.

I need more information to help you.

  1. What is your OS e.g. Ubuntu, Debian, CentOS ?
  2. What Webserver do you use, e.g. Nginx, Apache ?
  3. Should these Websites be on different Domain Names ?

Well, though it is been answered in quiet a bit of a detail, just wanted to add, that a VPS is meant for this purpose. You can host an array of different CMSes on the same server with just a restriction of resources like CPU, RAM & Disk Space vis-a-vis your visitors to these sites :)

– Regards Saurabh

Servopia.com Managed Cloud Hosting For PHP Applications