An error occured while installing mysql2 (0.3.11), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.3.11'` succeeds before bundling.
# apt-get install mysql-client libmysqlclient-dev
# apt-get install mysql-client libmysqlclient-dev
test.example.com test2.example.comGo to your's DNS config panel and add 2 CNAME records with ec2 instance address ( same for both)
ec2-XXX-XXX-XXX-XXX.compute-1.amazonaws.comlogin to aws.
yum install nginxsee version (for future troubleshooting, if it ocuur)
nginx -vCreate 2 vhosts folder tructures.
cd /var/ mkdir www cd www/Folder for each vhost
mkdir test.example.com mkdir test2.example.com cd test.example.com/ mkdir logs mkdir web mcedit web/index.htmlCreate simple html page:
<html> <body>test.example.com</body> </html>
cd .. cd test2.example.com/ mkdir logs mkdir web mcedit web/index.htmlContent for vhost 2
<html> <body>test2.example.com</body> </html>Change web root owner
chown -R nginx:nginx /var/www
cd /etc/nginx/conf.d/ mcedit virtual.confAdd this lines to virtual.conf:
index index.htm index.html index.php; # # test.example.com # server { listen 80; server_name www.example.com; rewrite ^ $scheme://test.example.com$request_uri? permanent; } server { listen 80; server_name test.example.com; access_log /var/www/test.example.com/logs/access.log; error_log /var/www/test.example.com/logs/error.log; root /var/www/test.example.com/web; } # # test2.example.com # server { listen 80; server_name www.test2.example.com; rewrite ^ $scheme://test2.example.com$request_uri? permanent; } server { listen 80; server_name test2.example.com; access_log /var/www/test2.example.com/logs/access.log; error_log /var/www/test2.example.com/logs/error.log; root /var/www/test2.example.com/web; }Restart nginx:
service nginx restartOpen in browser http://test.example.com and test2.example.com . Each page has different content.