Forum Moderators: phranque

Message Too Old, No Replies

Testpage!?

How do I get rid of the testpage

         

Spde

1:00 am on Jan 4, 2004 (gmt 0)

10+ Year Member



Hi!
I've just got a step-by-step "guide" from DaveAtIFG (Thanks Dave!) on how to set up an apache server for LAN.
Now, I would like to take the server beyond that. I've experimented a little and I've managed to show visitors an "Testpage for Apache"...
When I surf to the LAN ip of my server (from another PC in the LAN), I can access it perfrectly. I can see the index.html file I've put there and so on..
I am behind a gateway and I've forwarded port 80 to my server...
I guess I probably haven't set the access rights correclty...
Could someone help me with this? 'Cause I'm going bananas... =)
If you need any more info then tell me and I'll post it!

Thanks!
//Tommy

fwwebs

5:45 am on Jan 4, 2004 (gmt 0)

10+ Year Member



I'm a little confused. You say you can view your index page that you created using your LAN IP, but your subject says
How do I get rid of the test page

When do you get the Apache test page?

bcolflesh

6:37 am on Jan 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The default page is in your Apache install dir under:

\htdocs

You can delete everything in there, or add a placeholder index.html file.

DaveAtIFG

7:38 am on Jan 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



FYI, what he has (or recently had ;) ) for a LAN setup is at [webmasterworld.com...]

Spde

10:55 am on Jan 4, 2004 (gmt 0)

10+ Year Member



hmmm... I'll make a "graphical explanation"

Person on internet -> Gateway -> ApacheServer -> Sees a TESTPAGE (Everything is Acces Denied)
Person on LAN -> ApacheServer -> Can see index.html

That's kinda what it's like, hope you understood.

Bcolflesh: Where is Apache installed by default? I installed at the same time that I installed RedHat 9.0, so I don't know where it placed itself! =)

//Tommy

fwwebs

5:00 pm on Jan 4, 2004 (gmt 0)

10+ Year Member



hmmm... I'll make a "graphical explanation"
Person on internet -> Gateway -> ApacheServer -> Sees a TESTPAGE (Everything is Acces Denied)
Person on LAN -> ApacheServer -> Can see index.html

Find the <Directory .../htdocs> directive and see if it says 'allowed from all' or 'allowed from (Lan address)

Do you have VirtualHosts in your httpd.conf?

Do you have more than 1 NIC?

Bcolflesh: Where is Apache installed by default? I installed at the same time that I installed RedHat 9.0, so I don't know where it placed itself! =)

Look for a file called httpd.conf, it should be located in the /etc directory. Within the directory containing httpd.conf should contain all of your configuration files for Apache.

Spde

8:11 pm on Jan 4, 2004 (gmt 0)

10+ Year Member



Quote:
//
Find the <Directory .../htdocs> directive and see if it says 'allowed from all' or 'allowed from (Lan address)

Do you have VirtualHosts in your httpd.conf?

Do you have more than 1 NIC?
//

1. In the httpd.conf, I couldn't find the htdocs directive, it's not there... (Where could it be?)

2. No idea if I've got VirtualHosts... Perhaps Dave would know.... (?)

3. What's a NIC? is it some sort of IP adress? In that case, I only have one networkcard and one IP....

//Tommy

fwwebs

11:12 pm on Jan 4, 2004 (gmt 0)

10+ Year Member



NIC is a network card. You only have one so that's not the problem.

1. In the httpd.conf, I couldn't find the htdocs directive, it's not there... (Where could it be?)

Look in your httpd.conf for DocumentRoot, copy the lines and post them.

Find the following lines in you httpd.conf, it may not be identical:
#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory

Post the <Directory statement that follows.

You say you made a test index, what directory is it in?

Spde

12:21 am on Jan 5, 2004 (gmt 0)

10+ Year Member



DocumentRoot "/var/www/html"

#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory "/">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from 192.168.0
Allow from 127.0.0.1
Allow from localhost
Allow from 192.168.0.1
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/var/www/html">

#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI Multiviews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# [httpd.apache.org...]
# for more information.
#
Options Indexes Includes FollowSymLinks ExecCGI MultiViews

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All

#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from 192.168.0
Allow from 127.0.0.1
Allow from localhost
Allow from 192.168.0.1
</Directory>


I think that's everything you want (plus some more).
My index.html file is in the folder /var/www/html/

//Tommy

fwwebs

1:03 am on Jan 5, 2004 (gmt 0)

10+ Year Member




DocumentRoot "/var/www/html"
<Directory "/">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from 192.168.0
Allow from 127.0.0.1
Allow from localhost
Allow from 192.168.0.1
</Directory>

<Directory "/var/www/html">
AllowOverride All
Order allow,deny
Allow from 192.168.0
Allow from 127.0.0.1
Allow from localhost
Allow from 192.168.0.1
</Directory>

Change to this: (Make sure you leave the commented lines with a # as is for later reference)

<Directory "/">
Options FollowSymLinks
AllowOverride None
</Directory>

<Directory "/var/www/html">
AllowOverride All
Order allow,deny
Allow from all
</Directory>

Spde

6:07 pm on Jan 5, 2004 (gmt 0)

10+ Year Member



Hey, it worked! Thanks!
the index.html can be viewed on my domain name
hehe... it only says "hult". But It's always a start!

Thanks!
//Tommy

[edited by: DaveAtIFG at 6:50 pm (utc) on Jan. 5, 2004]
[edit reason] Removed specifics [/edit]