LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-07-2016, 11:50 AM   #1
AdultFoundry
Member
 
Registered: Jun 2015
Posts: 282

Rep: Reputation: Disabled
Setting up websites on a dedicated hosting plan


I want to do the following thing:

1) Transfer domain1.com to this new hosting (it is a php script + database)

2) Install another script + database on sub.domain1.com

3) In the future, add more websites also based on a script + database model, like Wordpress or vBulletin:

domain2.com
domain3.com
domain4.com

This will be based on name based virtual hosting, and I am not sure how would I start this part. Create two separate Virtual hosts for domain1.com and sub.domain1.com? Is this how it works?

I know that this is kind of basic, and it should be obvious, but I am not sure.

This would be in folders like:

/home/www/html/domain1.com
/home/www/html/domain2.com
/home/www/html/domain3.com and so on.

I want to log to just one log and include the Virtual Host name in there, do some log rotation and other things like this...
 
Old 01-07-2016, 11:55 AM   #2
AdultFoundry
Member
 
Registered: Jun 2015
Posts: 282

Original Poster
Rep: Reputation: Disabled
Would I start this (the two first scripts) with something like this?

Code:
# Ensure that Apache listens on port 80
Listen 80
<VirtualHost *:80>
    DocumentRoot "/home/www/html/domain1.com"
    ServerName domain1.com
  
    # Other directives here
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "/home/www/html/sub.domain1.com"
    ServerName sub.domain1.com

    # Other directives here
</VirtualHost>
I already have two separate databases. Then, install two scripts in two separate folders, and get it to work like this?

After some time I want to change script A (current domain1.com) to sub.domain1.com and script B (current sub.domain1.com) to domain1.com (switch things around).

Again, this should be kind of obvious, but I dont work on it everyday, and I am not sure (just setting up websites from time to time, and working on them).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
The best way of setting up back up on a CentOS 7 hosting plan AdultFoundry Linux - Server 1 12-10-2015 11:24 AM
Dedicated Hosting zok General 1 03-29-2007 03:10 PM
How to protect my dedicated server and websites ? my-unix-dream Linux - Security 1 06-08-2005 10:48 AM
Dedicated Server Plan devfreak Linux - Networking 2 02-28-2005 03:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration