Results 1 to 2 of 2

Thread: APCHE2 Config

  1. #1
    Join Date
    Jul 2009
    Beans
    4

    APCHE2 Config

    Hi
    I'm new to Linux and have previously just battled with windows
    I have an old PC running as an Ubuntu server. It has Apache2 installed and im having probles using the: Virtual Hosts Set Up
    I have set the 'hosts' files on my other computers to send all traffic from:
    server.myweb
    mscweb.myweb
    server
    mscweb
    myweb
    all to the servers address port 192.168.1.10
    which all works fine these addresses give me no errors however
    all these addresss always resolve to the same website

    Code:
    <VirtualHost mscweb:80>
    ServerAdmin mscweb@myweb
    ServerName mscweb.myweb
    ServerAlias mscweb
    DocumentRoot /var/www/mscweb.myweb
    
    <Directory />
                    Options FollowSymLinks
                    AllowOverride None
            </Directory>
    
            <Directory /var/www/mscweb.myweb>
                    Options Indexes FollowSymLinks MultiViews
                    AllowOverride All
                    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/log/apache2/avh-error.log
            # Possible values include: debug, info, notice, warn, error, crit,
            # alert, emerg.
            LogLevel warn
            CustomLog /var/log/apache2/access.log combined
            Alias /doc/ "/usr/share/doc/"
            <Directory "/usr/share/doc/">
                    Options Indexes MultiViews FollowSymLinks
                    AllowOverride None
                    Order deny,allow
                    Deny from all
                    Allow from 127.0.0.0/255.0.0.0 ::1/128
            </Directory>
    </VirtualHost>
    Code:
    <VirtualHost *:80>
    ServerName server.myweb
    serverAlias myweb
    ServerAlias server
    DocumentRoot /var/www
    <Directory />
                    Options FollowSymLinks
                    AllowOverride None
            </Directory>
    
            <Directory /var/www>
                    Options Indexes FollowSymLinks MultiViews
                    AllowOverride All
                    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/log/apache2/error.log
            # Possible values include: debug, info, notice, warn, error, crit,
            # alert, emerg.
            LogLevel warn
            CustomLog /var/log/apache2/access.log combined
            Alias /doc/ "/usr/share/doc/"
            <Directory "/usr/share/doc/">
                    Options Indexes MultiViews FollowSymLinks
                    AllowOverride None
                    Order deny,allow
                    Deny from all
                    Allow from 127.0.0.0/255.0.0.0 ::1/128
            </Directory>
    </VirtualHost>
    MSCWEB is supposed to pass the /var/www/mscweb folder only
    and any request to any other address shud pass /var/www but esspecially server.myweb
    i have been tweaking this alot and to no joy
    if i remove the enabling link it makes it work
    but when i put the mscweb one bak ti becomes global again
    This has been tried on ubuntu text only server, ubuntu & kubuntui tooo
    please help

  2. #2
    Join Date
    May 2007
    Location
    Phoenix, Arizona USA
    Beans
    2,909
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: APCHE2 Config

    Configuration is not what you think on Ubuntu. Try this:

    http://beginlinux.com/server_trainin...-based-hosting

    -Tim
    www.pcchopshop.net

    Hard to find and obsolete PC and server parts. "If we can't find it, it probably doesn't exist"

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
  •