I’ve started two drupal courses through P2PU and want to keep my work on each separated.
To achieve this I need:
- Two separate drupal folders
- Two separate drupal databases
- Two separate virtual sites for apache
I made the first site “drupalintro” in the same manner as outlined in my earlier post P2PU: Drupal Social Web Application #1 with the following changes.
- The drupal directory was named /var/www/drupalintro
- $ mysqladmin –u root –p create drupalintro
- mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON drupalintro.* TO ‘<drupaluser>’@’localhost’ IDENTIFIED BY ‘<drupalpass>’;
- mysql> FLUSH PRIVILEGES;
- mysql> \q
- $ vim /var/www/drupalintro/sites/default/settings.php
- edit: $db_url = ‘mysql://<drupaluser>:<drupalpass>@localhost/drupalintro’;
- $ cp /etc/apache2/sites-available/default /etc/apache2/sites-available/drupalintro
- $ vim /etc/apache2/sites-available/drupalintro
- edit: DocumentRoot /var/www/drupalintro
- edit: Directory /var/www/drupalintro
Now to make the second site called “openhippel” I did the same again with the following changes:
- The drupal directory was named /var/www/openhippel
- $ mysqladmin –u root –p create openhippel
- mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON openhippel.* TO ‘<drupaluser>’@’localhost’ IDENTIFIED BY ‘<drupalpass>’;
- mysql> FLUSH PRIVILEGES;
- mysql> \q
- $ vim /var/www/openhippel/sites/default/settings.php
- edit: $db_url = ‘mysql://<drupaluser>:<drupalpass>@localhost/openhippel;
- $ cp /etc/apache2/sites-available/default /etc/apache2/sites-available/openhippel
- $ vim /etc/apache2/sites-available/openhippel
- edit: DocumentRoot /var/www/openhippel
- edit: Directory /var/www/openhippel
Now to change between the two virtual sites I simply use the following (shown for selecting drupalintro)
- $ sudo a2dissite openhippel && sudo a2ensite drupalintro
- $ sudo /etc/init.d/apache2 reload
Then I can browse to my localhost address and see the home page for the desired site.
The difference between the right word and the almost right word is more than just a fine line! it's like the difference between a lightning bug and the lightning!
ReplyDeletewe buy houses cash
I enjoyed reading your nice blog. I see you offer priceless info. Stumbled into this blog by chance but I'm sure glad I clicked on that link. You definitely answered all the questions I've been dying to answer for some time now. Will definitely come back for more of this.
ReplyDeleteskinny fiber
To tell you the teuth I was passing around and come across your site. It is wonderful. I mean as a content and design. I added you to my list and decided to spent the rest of the weekend browsing. Well done!
ReplyDeletehouses in san antonio