Results 1 to 2 of 2

Thread: setting up Virtualhost apache

  1. #1
    Join Date
    Nov 2010
    Beans
    17

    setting up Virtualhost apache

    Hello everyone.

    I am setting up a VirtualHost on my Apache. I am quite not familiar with Ubuntu setup so I am wondering what will I do with the 000-default file (which contains a template of virtualhost syntax)? What filename will I save it to?

    Thanks.

  2. #2
    Join Date
    Aug 2011
    Beans
    3

    Re: setting up Virtualhost apache

    Quote Originally Posted by kingdm View Post
    Hello everyone.

    I am setting up a VirtualHost on my Apache. I am quite not familiar with Ubuntu setup so I am wondering what will I do with the 000-default file (which contains a template of virtualhost syntax)? What filename will I save it to?

    Thanks.
    Code:
    #cd /etc/apache2/sites-available
    $sudo cp 000-default site
    $sudo nano /etc/apache2/sites-available/site
    
    
    <VirtualHost *:80>
    ServerAdmin webmaster@test.com
    #
    DocumentRoot /var/www/
    ServerName www.test.com
     ErrorLog ${APACHE_LOG_DIR}/error.log
    
          
            # alert, emerg.
            LogLevel warn
    
            CustomLog ${APACHE_LOG_DIR}/access.log combined
    
    </VirtualHost>
    $sudo ln -s /etc/apache2/sites-available/site /etc/apache2/sites-enabled
    $sudo /etc/init.d/apache2 restart
    test with browser http://127.0.0.1
    Last edited by Iowan; January 27th, 2012 at 12:00 AM. Reason: remove URL

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •