How to setup a Linux web server using the command line, Part 3 : Apache Vhosts
#
# Create Apache Vhosts for Subversion+Capistrano Web Applications
#
Back in Part 2, we installed our Web 2.0 server applications. Let’s continue our Linux web server setup by installing some Web 2.0 sites. Web application sites are handled in apache2 server by setting up vhosts, or virtual hosts. Virtual hosts allow you to setup your websites the way you want, all from a text config file that’s easy to create and make changes to.
# on remote server
# create apache vhost config for each web application site
sudo nano /etc/apache2/sites-available/mydomain1.com
# see apache2_sites-available_mydomain1.com filesudo nano /etc/apache2/sites-available/mydomain2.net
# see apache2_sites-available_mydomain2.net filesudo nano /etc/apache2/sites-available/mydomain3.ws
# see apache2_sites-available_mydomain3.ws file
# create self-signed ssl certificates
sudo make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/ssl/certs/mydomain1.com.pem
sudo make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/ssl/certs/mydomain2.net.pem
sudo make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/ssl/certs/mydomain3.ws.pem
# create web server’s public root directory as super
mkdir /home/super/public_html
#chown -R super:super /home/super/public_html
Done!
Now on to Part 4 where we setup a subversion repository for each of these apache vhosts we’ve setup…
























You must be logged in to post a comment.