Unix Technical Forum

SEO

vBulletin Search Engine Optimization


Go Back   Unix Technical Forum > Unix Operating Systems > Debian Linux > Debian Linux support

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-27-2008, 09:17 AM
Charles Chambers
 
Posts: n/a
Default Apache2 Document Directory

Can someone point me to where in Deb 4.0 / Apache2 to connfigure the default
directory??

I try browsing from a different computer on the LAN, and I get page cannot
be displayed.

I try http://localhost and I get "It works!" (but the default in
/var/www/apache2-default is gone...see below). But MediaWiki, phpBBS3,
WebMin, UserMin, and VirtualMin all work.

I've copied a *very* basic site in /var/www/apache2-default and
/var/www/localhost, and I've changed the DocumentRoot in
/etc/apache2/sites-enabled/default to /var/www/localhost.



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-27-2008, 09:17 AM
Tony van der Hoff
 
Posts: n/a
Default Re: Apache2 Document Directory

On 25 Jan at 1:40 "Charles Chambers" <cchamb2@hotmail.com> wrote in message
<13pife92rdragdf@news.supernews.com>

> Can someone point me to where in Deb 4.0 / Apache2 to connfigure the
> default directory??
>
> I try browsing from a different computer on the LAN, and I get page cannot
> be displayed.
>
> I try http://localhost and I get "It works!" (but the default in
> /var/www/apache2-default is gone...see below). But MediaWiki, phpBBS3,
> WebMin, UserMin, and VirtualMin all work.
>
> I've copied a *very* basic site in /var/www/apache2-default and
> /var/www/localhost, and I've changed the DocumentRoot in
> /etc/apache2/sites-enabled/default to /var/www/localhost.
>


Yes, I've just been through the same exercise

It's at /etc/apache2/sites-available/default.
This is my modified file; adapt it to your site. Hope it helps:

***********************************************
NameVirtualHost *
<VirtualHost *>
ServerAdmin webmaster@magpieway.net

DocumentRoot /home/www/html

# <Directory />
# Options FollowSymLinks
# AllowOverride None
# Deny from all
# </Directory>

<Directory /home/www/html>
Options Indexes FollowSymLinks MultiViews Includes
XBitHack on
AllowOverride All
Order deny,allow
#Allow from all
Deny from all
#Allow from 192.168.10
#Allow from 127.0.0.1

# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right
place
#RedirectMatch ^/$ /apache2-default/
</Directory>

<Directory /home/*/public_html>
AllowOverride All
Options MultiViews -Indexes Includes FollowSymLinks

Order allow,deny
Allow from all
</Directory>

<Directory /home/*/public_html/cgi-bin>
Options +ExecCGI -Includes -Indexes
SetHandler cgi-script

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
ServerSignature On

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
Allow from 192.168.10
Allow from 127.0.0.1
</Directory>

Alias /tmp /tmp
<Directory /tmp>
# CGI scripts need access here
options none

# deny to all by default
Order deny,allow
Deny from all

# allow access from local net
Allow from 127.0.0.1
Allow from 192.168.10
#ErrorDocument 403 "This directory can only be viewed from the local
network."
</Directory>

</VirtualHost>
***********************************************

--
Tony van der Hoff | mailto:news_0711@vanderhoff.org
Buckinghamshire, England
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-27-2008, 09:17 AM
Charles Chambers
 
Posts: n/a
Default Re: Apache2 Document Directory

It should. Let me see if I understand it.

I have this up in Windows at www.wiredisp.tld (replace tld with com, net,
org, us, biz, or info), but I REALLY want to migrate it to Debian.

But first, some organization (I know, I'm obsessive about easy to read <g>).
I'll add more comments and change paths before it goes live on the 'Net.

Is this the same thing (other than the directories)?

Can I restart Apache@Debian now <G>?

===========================================

NameVirtualHost *

<VirtualHost *>

ServerAdmin webmaster<at sign>charles.is-a-geek.net
DocumentRoot /var/www

#==========[directory clause]====================
# <Directory />
# Options FollowSymLinks
# AllowOverride None
# Deny from all
# </Directory>
#==========[end of directory clause]=============

#==========[directory clause]====================
<Directory /var/www/localhost>
Options Indexes FollowSymLinks MultiViews Includes
XBitHack on
AllowOverride All
Order deny,allow
#Allow from all
Deny from all
#Allow from 192.168.11
#Allow from 127.0.0.1

# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right
place
#RedirectMatch ^/$ /localhost/
</Directory>
#==========[end of directory clause]=============

#==========[directory clause]====================
<Directory /home/*/public_html>
AllowOverride All
Options MultiViews -Indexes Includes FollowSymLinks

Order allow,deny
Allow from all
</Directory>
#==========[end of directory clause]=============

#==========[directory clause]====================
<Directory /home/*/public_html/cgi-bin>
Options +ExecCGI -Includes -Indexes
SetHandler cgi-script

Order allow,deny
Allow from all
</Directory>
#==========[end of directory clause]=============

#==========[directory clause]====================
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
#==========[end of directory clause]=============

#==========[directory clause]====================
<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
Allow from 192.168.11
Allow from 127.0.0.1
</Directory>
#==========[end of directory clause]=============

#==========[directory clause]====================
<Directory /tmp>
# CGI scripts need access here
options none

# deny to all by default
Order deny,allow
Deny from all

# allow access from local net
Allow from 127.0.0.1
Allow from 192.168.11
#ErrorDocument 403 "This directory can only be viewed from the local
network."
</Directory>
#==========[end of directory clause]=============

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/

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

ServerSignature On

Alias /doc/ "/usr/share/doc/"
Alias /tmp /tmp

</VirtualHost>

==========================================


"Tony van der Hoff" <news@nospam.vanderhoff.org> wrote in message
news:gemini.jv7191034lhxc02rt.news@nospam.vanderho ff.org...
> On 25 Jan at 1:40 "Charles Chambers" <cchamb2@hotmail.com> wrote in
> message
> <13pife92rdragdf@news.supernews.com>
>
>> Can someone point me to where in Deb 4.0 / Apache2 to connfigure the
>> default directory??
>>
>> I try browsing from a different computer on the LAN, and I get page
>> cannot
>> be displayed.
>>
>> I try http://localhost and I get "It works!" (but the default in
>> /var/www/apache2-default is gone...see below). But MediaWiki, phpBBS3,
>> WebMin, UserMin, and VirtualMin all work.
>>
>> I've copied a *very* basic site in /var/www/apache2-default and
>> /var/www/localhost, and I've changed the DocumentRoot in
>> /etc/apache2/sites-enabled/default to /var/www/localhost.
>>

>
> Yes, I've just been through the same exercise
>
> It's at /etc/apache2/sites-available/default.
> This is my modified file; adapt it to your site. Hope it helps:
>
> ***********************************************
> NameVirtualHost *
> <VirtualHost *>
> ServerAdmin webmaster@magpieway.net
>
> DocumentRoot /home/www/html
>
> # <Directory />
> # Options FollowSymLinks
> # AllowOverride None
> # Deny from all
> # </Directory>
>
> <Directory /home/www/html>
> Options Indexes FollowSymLinks MultiViews Includes
> XBitHack on
> AllowOverride All
> Order deny,allow
> #Allow from all
> Deny from all
> #Allow from 192.168.10
> #Allow from 127.0.0.1
>
> # This directive allows us to have apache2's default start page
> # in /apache2-default/, but still have / go to the right
> place
> #RedirectMatch ^/$ /apache2-default/
> </Directory>
>
> <Directory /home/*/public_html>
> AllowOverride All
> Options MultiViews -Indexes Includes FollowSymLinks
>
> Order allow,deny
> Allow from all
> </Directory>
>
> <Directory /home/*/public_html/cgi-bin>
> Options +ExecCGI -Includes -Indexes
> SetHandler cgi-script
>
> 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
> ServerSignature On
>
> 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
> Allow from 192.168.10
> Allow from 127.0.0.1
> </Directory>
>
> Alias /tmp /tmp
> <Directory /tmp>
> # CGI scripts need access here
> options none
>
> # deny to all by default
> Order deny,allow
> Deny from all
>
> # allow access from local net
> Allow from 127.0.0.1
> Allow from 192.168.10
> #ErrorDocument 403 "This directory can only be viewed from the local
> network."
> </Directory>
>
> </VirtualHost>
> ***********************************************
>
> --
> Tony van der Hoff | mailto:news_0711@vanderhoff.org
> Buckinghamshire, England



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 08:32 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62