Find the answer to your Linux question:
Results 1 to 5 of 5
I've got 5 virtuell domains on my apache webserver, and everything works fine except the <Directory ...> rights. Take a look how I set it up: Code: <VirtualHost *> DocumentRoot ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2003
    Location
    /var/www/
    Posts
    23

    Configuring <Directory...


    I've got 5 virtuell domains on my apache webserver, and everything works fine except the <Directory ...> rights. Take a look how I set it up:

    Code:
    <VirtualHost *>
        DocumentRoot /var/www/modetwo-net/
        ServerName modetwo.net
        ServerAlias www.modetwo.net
        ErrorLog /var/log/apache/modetwo-net_error.log
        CustomLog /var/log/apache/modetwo-net_access.log combined
        <Directory /var/www/modetwo-net>
    	Options -Indexes
    	AllowOverride All
        </Directory>
    </VirtualHost>
    Now, I think what I've put inside <Directory ..> is wrong. It won't let me run CGI scripts etc. And htaccess files which are used to authenticate users up against a htpasswd file doesn't work, the error in the log is "User mOdEtWo, no such user".

    Well, what should I write inside <Directory...>? What I want to achieve, is to make htaccess files work, make CGI scripts work, AND turn off directory listing.

    Tips?

  2. #2
    Linux User Allblack's Avatar
    Join Date
    May 2003
    Location
    Godzone
    Posts
    416
    This is my conf file

    Code:
    <VirtualHost 192.168.1.6>
       ServerAdmin webmaster@www.mydomain.com
       DocumentRoot /www/www.mydomain.com
       ServerName www.mydomain.com
       <Directory "/www/www.mydomain/cgi-bin">
       Options ExecCGI
       Order allow,deny
       Allow from all
       </Directory>
       ScriptAlias /cgi-bin/ /www/www.mydomain.com/cgi-bin/
       Alias /startrek/ "/www/www.mydomain.com/startrek/"
       ErrorLog /www/wwwlogs/www.mydomain.com-error_log
       CustomLog /www/wwwlogs/www.mydomain.com-access_log common
    </VirtualHost>
    Make sure that your cgi-bin directory has executable permissions for world

    HTH
    I am on a journey to mastering Linux and I got a bloody long way to go!!!

  3. #3
    Just Joined!
    Join Date
    Nov 2003
    Location
    root@heaven
    Posts
    7
    Quote Originally Posted by code
    <VirtualHost *>
    DocumentRoot /var/www/modetwo-net/
    put this one ..

    Quote Originally Posted by code2
    <VirtualHost *>
    DocumentRoot /var/www/modetwo-net
    You shouldn't put slash at the end of dir... ;)

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Nov 2003
    Posts
    9
    what config file are you talking about

  6. #5
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284
    Quote Originally Posted by shadowfox
    what config file are you talking about
    httpd.conf

    to find it, open a terminal, and type:
    "updatedb"
    then type:
    "locate httpd.conf"

    Jason

Posting Permissions

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