Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19
Name Based Virtual Host help
Results 1 to 4 of 4

Thread: Name Based Virtual Host help

  1. #1

    Name Based Virtual Host help

    [root@mike conf]# httpd -S
    VirtualHost configuration:
    65.112.18.137:80 is a NameVirtualHost
    default server www.ndxforum.com (/etc/httpd/conf/httpd.co
    nf:1209)
    port 80 namevhost www.ndxforum.com (/etc/httpd/conf/httpd
    .conf:1209)
    port 80 namevhost www.datamike.net (/etc/httpd/conf/httpd
    .conf:1216)

    is what I get when I use the -S option. It looks like it is set up correct. I changed my DNS so both ndxforum.com and datamike.net are pointing at the same IP. I can access ndxforum.com but datamike.net shows me a page cannot be displayed. I changed my DNS on Wed, I think. I still can't resolve datamike.net though. Do you think that I just have to wait another day or do I need to change something in httpd.conf? I have been fighting with this for hours. I have tried every setup I know of. Please help.

  2. #2
    Moderator
    Advisor
    redhead's Avatar
    Join Date
    Jun 2001
    Location
    Copenhagen, Denmark
    Posts
    811

    Re:Name Based Virtual Host help

    redhead@ask{58} ~> host www.datamike.net
    www.datamike.net has address 65.112.18.137
    redhead@ask{59} ~> lynx www.datamike.net
    NDX Forum Page

    [forummain.jpg]

    Welcome to the NDX Forum Page.
    In order to get an account to access the database of this forum you
    must register. Registering is free and only takes a minute. Click on
    the register button after you enter the site and fill in the info it
    asks for. We have many different areas of interest on this forum but
    as a new member you are not allowed access to any area until you have
    been verified a valid NDX employee or associate. Please call the home
    office at 508-358-4422, ask for Mike Clark and upon authorization you
    will have access to the specific areas. Enjoy the site

    >>ENTER<<
    [bottom.jpg]
    Is this what you were hoping for to get ??
    Make sure your virtualhost setting for your apache is something like this:
    Code:
    NameVirtualHost 65.112.18.137
    
    <VirtualHost 65.112.18.137>
        ServerAdmin info@ndxforum.com
        DocumentRoot /var/www/ndxforum.com
        ServerName www.ndxforum.com
        ServerAlias ndxforum.com
        ErrorLog logs/ndxforum.com-error.log
        CustomLog logs/ndxforum.com-access.log combined
        <Directory "/var/www/ndxforum.com">
           Options Indexes FollowSymLinks
           AllowOverride AuthConfig
           Order allow,deny
           Allow from all
        </Directory>
    </VirtualHost>
    
    <VirtualHost 65.112.18.137>
        ServerAdmin info@datamike.net
        DocumentRoot /var/www/datamike.net
        ServerName www.datamike.net
        ServerAlias datamike.net
        ErrorLog logs/datamike.net-error.log
        CustomLog logs/datamike.net-access.log combined
        <Directory "/var/www/datamike.net">
           Options Indexes FollowSymLinks
           AllowOverride AuthConfig
           Order allow,deny
           Allow from all
        </Directory>
    </VirtualHost>

  3. #3

    Re:Name Based Virtual Host help

    This is how I have my VirtualHost setup.

    NameVirtualHost 65.112.18.137


    <VirtualHost 65.112.18.137>
    ServerAdmin mclark@nationaldentex.com
    DocumentRoot /var/www/html
    ServerName www.ndxforum.com
    ServerAlias ndxforum.com
    ErrorLog logs/ndxforum.com-error.log
    CustomLog logs/ndxforum.com-access.log combined
    <Directory "/var/www/html">
    Options Indexes FollowSymLinks
    AllowOverride AuthConfig
    Order allow,deny
    Allow from all
    </Directory>
    </VirtualHost>

    <VirtualHost 65.112.18.137>
    ServerAdmin datamike@datamike.net
    DocumentRoot /var/www/html/public_html/mike/
    ServerName www.datamike.net
    ServerAlias datamike.net
    ErrorLog logs/datamike.net-error.log
    <Directory "/var/www/html/public_html/mike/">
    AllowOverride AuthConfig
    Order allow,deny
    Allow from all
    </Directory>
    </VirtualHost>


    I notice that I also have
    # Documents
    DocumentRoot /var/www/html
    UserDir public_html
    IndexOptions FancyIndexing

    up in the beginning of the file. Is this conflicting with the virtual host? I can't see any problems with this setup. Does anyone else see problems?


  4. #4
    Moderator
    Advisor
    redhead's Avatar
    Join Date
    Jun 2001
    Location
    Copenhagen, Denmark
    Posts
    811

    Re:Name Based Virtual Host help

    .....
    DocumentRoot /var/www/html/public_html/mike/
    ...
    <Directory "/var/www/html/public_html/mike/">
    ...
    No trailing '/' allowed in the DocumentRoot setting.
    appart from that, I can't see why it wouldn't do anything..
    is the user 'mike' having $HOME as /var/www/html? and are the settings on /var/www/html/public_html/mike, so that the nobody user can access it and read the files there ?
    If the user dosn't have the /var/www/html as $HOME the UserDir setting wont interfere with this DocumentRoot setting on the virtualhost.

Similar Threads

  1. Virtual host/local host PAM File problem!
    By honey bee in forum Linux - Hardware, Networking & Security
    Replies: 0
    Last Post: 03-01-2006, 01:38 PM
  2. apache virtual host
    By mars in forum Linux - General Topics
    Replies: 1
    Last Post: 01-15-2005, 07:30 AM
  3. Is occupying disk size can vary based on host OS?
    By Compunuts in forum Windows - General Topics
    Replies: 2
    Last Post: 07-19-2004, 06:39 AM
  4. VIRTUAL HOST HELP
    By -=amity=- in forum Linux - General Topics
    Replies: 2
    Last Post: 07-17-2004, 07:23 PM
  5. Virtual Host setup
    By datamike in forum Linux - Hardware, Networking & Security
    Replies: 6
    Last Post: 11-18-2002, 11:53 PM

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
  •