Results 1 to 5 of 5

Thread: cannot open virtualhost site in browser

  1. #1
    Join Date
    Oct 2010
    Beans
    4

    cannot open virtualhost site in browser

    I'm following this thread and with most of your suggestions I have added a virtual host but when enter the ServerAlias to the browser it just doesn't works. I have added everything, I run the a2ensite successfully, also created all the folders to work with the site, plus the DocumentRoot to point to the folder in the /var/www directory, and I still get the error:

    HTML Code:
    The server at redinblackcafe.local can't be found, because the DNS lookup failed.
    This is the file in the /etc/apache2/sites-available/redinblackcafe:

    PHP Code:
    <VirtualHost *:80>
        
    ServerName  127.0.0.1
        ServerAdmin rvila
    @redinblackcafe.com
        ServerAlias redinblackcafe
    .local

        DocumentRoot 
    /var/www/redinblackcafe.local
        
    <Directory />
            
    Options FollowSymLinks
            AllowOverride None
        
    </Directory>
        <
    Directory /var/www/redinblackcafe.local>
            
    Options Indexes FollowSymLinks MultiViews
            AllowOverride None
            Order allow
    ,deny
            allow from all
        
    </Directory>

        
    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <
    Directory "/usr/lib/cgi-bin">
            
    AllowOverride None
            Options 
    +ExecCGI -MultiViews +SymLinksIfOwnerMatch
            Order allow
    ,deny
            Allow from all
        
    </Directory>

        
    ErrorLog /var/www/redinblackcafe.local/err/error.log

        
    # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        
    LogLevel warn

        CustomLog 
    /var/www/redinblackcafe.local/log/access.log combined
    </VirtualHost
    Can anyone point out what I'm doing wrong?

  2. #2
    Join Date
    May 2007
    Location
    NY's first capital
    Beans
    2,549
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: VirtualHosting problem: "ERROR: Site mysite.com does not exist!"

    You should have likely created a new thread.

    The error is indicating a dns entry. The serverAlias does not create a dns entry for you machine. You need to tell your machine and any network machines where redinblackcafe.local is located (what ip address to translate to).

    A quick and easy fix would be to add an entry in /etc/hosts for any machine you want to be able to access the site.


    For your local machine adding:

    Code:
    127.0.0.1 redinblackcafe.local
    Should work. For any other clients on the LAN you would need to enter the network ip address of you webserver. You can find your servers local ip by running ifconfig.

    Code:
    ifconfig
    Nothing is ever easy, but if it is difficult you must be doing it wrong.

  3. #3
    Join Date
    Oct 2010
    Beans
    4

    Smile Re: VirtualHosting problem: "ERROR: Site mysite.com does not exist!"

    Thank you volkswagner, I added the line in the /etc/hosts and works like a charm.

    And about to post a new question, you are right, I should open a new question and post your answer as the right answer. Thanks.

  4. #4
    Join Date
    Nov 2008
    Location
    Storybrooke
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: cannot open virtualhost site in browser

    Banana Split (Thread Split)
    Ubuntu Forums Moderation Staff
    Don't waste your energy trying to change opinions ... Do your thing, and don't care if they like it.

  5. #5
    Join Date
    Oct 2010
    Beans
    4

    Re: cannot open virtualhost site in browser

    Quote Originally Posted by sandyd View Post
    Banana Split (Thread Split)
    Thank you Sandy... I didn't know how to split this...

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
  •