LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 07-16-2003, 10:43 AM   #1
g-man76
LQ Newbie
 
Registered: Jul 2003
Posts: 2

Rep: Reputation: 0
Question Apache HTTP Server on Redhat 9


hi, i am new to apache and redhat 9 so i apologize if this sounds stupid. I setup my linux server and installed apache. I am trying to setup a website and it is not letting me change the default root directory.

i tried to put my website in /var/www/ dir but if i try to view it using a web browser and my servers ip address i get an Apache test page.

i changed the apache setting so that the default website is in /var/www and made sure that index.htm was a valid file.

i have gotten it to work but then if i reboot my computer it just goes back to the test page as the default page.

any help would be greatly appreciated...

im pulling my hair out.

thanks,
g.
 
Old 07-16-2003, 11:26 AM   #2
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
document root is at /var/www/html

if you have not changed anything in /etc/httpd/conf/httpd.conf then it will work as expected if you put your website in /var/www/html

if you want to change it then edit the file at this line..

DocumentRoot "/var/www/html"


[root@zeus root]# httpd -v
Server version: Apache/2.0.40
Server built: May 20 2003 10:15:29
[root@zeus root]# cat /etc/red*rel*
Red Hat Linux release 9 (Shrike)

Last edited by DavidPhillips; 07-16-2003 at 11:29 AM.
 
Old 07-29-2003, 11:31 AM   #3
troworld
Member
 
Registered: Jul 2003
Location: Toronto, ON
Distribution: Mandrake 9.1
Posts: 41

Rep: Reputation: 15
I having a similar problem. I need to change the default Apache 2 folder from /var/www/html/ to /var/www/eet/ .

I did that using webmin, and check the directives, which showed that, indeed, /var/www/eet/ is the default root folder.

The permissions on that folder are set to apache, and it has a valid index.html file.

What could be wrong?
 
Old 07-30-2003, 08:54 PM   #4
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
depends on the problem

make sure apache is running

give us more details on what's happening.

check log files

/var/log/httpd/
 
Old 07-31-2003, 08:54 AM   #5
troworld
Member
 
Registered: Jul 2003
Location: Toronto, ON
Distribution: Mandrake 9.1
Posts: 41

Rep: Reputation: 15
Apache 2.0.47 is running.

Nothing out of the ordinary is happening. When I changed the root directory of apache and restarted it, I kept being directed to the old /var/www/html/ . The directory that I want (/var/www/eet/) and the index.html file are owned by ŽapacheŽ so they can be accessed. Maybe there are some other files required for me to have before I can tell apache to use a different root directory?

IŽve just accessed the server again and this is the last entry in the log file. Nothing out of the ordinary, I believe:

127.0.0.1 - - [31/Jul/2003:09:45:33 -0400] "GET / HTTP/1.1" 200 3566 "-" "Mozilla/5.0 (compatible; Konqueror/3.1; Linux)"

This is a piece of my httpd.conf file that tells apache to use /var/www/eet/ instead of /var/www/html/ :

### Main Configuration Section
### You really shouldn't change these settings unless you're a guru
###
ServerType standalone
ServerRoot /etc/httpd
#ServerName localhost
#LockFile /etc/httpd/httpd.lock
PidFile /var/run/httpd.pid
ScoreBoardFile /etc/httpd/httpd.scoreboard
ErrorLog logs/error_log
LogLevel warn
ResourceConfig /dev/null
AccessConfig /dev/null
DocumentRoot /var/www/eet

Is there anymore info you need? I new at this, so IŽm not even sure where to look.

Thanks.
 
Old 07-31-2003, 07:16 PM   #6
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
set it to a non existant folder then restart the server and see if it fails to start. If it does not fail then it's not using that config file or the config file is corrupted to where apache can't read it correctly.


I would use an editor like vi. some gui based editors will corrupt files.
 
Old 07-31-2003, 07:24 PM   #7
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
the only obvious thing is this line, is it there

<Directory "/var/www/eet">
 
Old 07-31-2003, 07:30 PM   #8
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
Oh, and also the absence of an index.html would cause this problem
 
Old 08-01-2003, 08:32 AM   #9
troworld
Member
 
Registered: Jul 2003
Location: Toronto, ON
Distribution: Mandrake 9.1
Posts: 41

Rep: Reputation: 15
I tried setting the root directory to a non-existant folder and apache didn complain and simply loaded the default folder again (/var/www/html/).

The following is my httpd.conf file after all the LoadModule and AddModule directives:

###
### Global Configuration
###
# We now support multiple apache configurations on the same server. In
# common.conf, we put all directives that are common to all implementations
# (httpd, httpd-perl, etc.)
Include conf/commonhttpd.conf


###
### IP Address/Port and Proxied configuration section
###
# The APACHEPROXIED setting can be set in /etc/rc.d/init.d/httpd if you
# are using a proxy or accelerator, like the Apache-SGI or khttpd, so that
# the fast web server serves static content while Apache handles the
# cgi or php files

#BindAddress *
<IfDefine APACHEPROXIED>
Port 8080
Listen 8080
</IfDefine>
<IfDefine !APACHEPROXIED>
Listen *:80
</IfDefine>

# Likewise, we can set apache as the server by default and send perl
# requests via ProxyPass to apache-mod_perl. It increases performance
# since the perl interpreter is only used for perl and the standard apache
# does all the html and image files, with a smaller footprint.
#
# If you install apache and apache-mod_perl, this is the default config.
# If you don't want two web servers to use perl, uninstall apache, and
# apache-mod_perl will not be proxied.

<IfDefine PERLPROXIED>
RewriteEngine on
RewriteRule ^proxy:.* - [F]
RewriteRule ^(.*\/perl\/.*)$ http://%{HTTP_HOST}:8200$1 [P]
RewriteRule ^(.*\/cgi-perl\/.*)$ http://%{HTTP_HOST}:8200$1 [P]
</IfDefine>

###
### Log configuration Section
###

#Single logfile with access, agent and referer information
#This is the default, if vlogs are not defined for the main server
CustomLog logs/access_log combined env=!VLOG
#If VLOG is defined in conf/vhosts/Vhost.conf, we use this entry
CustomLog "|/usr/sbin/advxsplitlogfile" vhost env=VLOG


###
### Virtual Hosts
###
# We include different templates for Virtual Hosting. Have a look in the
# vhosts directory and modify to suit your needs.
Include conf/vhosts/Vhosts.conf
#Include conf/vhosts/DynamicVhosts.conf
#Include conf/vhosts/VirtualHomePages.conf


###
### Performance settings Section
###
#
# Timeout: The number of seconds before receives and sends time out.
#
TimeOut 300

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive on

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 15

#
# Server-pool size regulation. Rather than making you guess how many
# server processes you need, Apache dynamically adapts to the load it
# sees --- that is, it tries to maintain enough server processes to
# handle the current load, plus a few spare servers to handle transient
# load spikes (e.g., multiple simultaneous requests from a single
# Netscape browser).
#
# It does this by periodically checking how many servers are waiting
# for a request. If there are fewer than MinSpareServers, it creates
# a new spare. If there are more than MaxSpareServers, some of the
# spares die off. The default values are probably OK for most sites.
#
MinSpareServers 4
MaxSpareServers 10

#
# Number of servers to start initially --- should be a reasonable ballpark
# figure.
#
StartServers 4

#
# Limit on total number of servers running, i.e., limit on the number
# of clients who can simultaneously connect --- if this limit is ever
# reached, clients will be LOCKED OUT, so it should NOT BE SET TOO LOW.
# It is intended mainly as a brake to keep a runaway server from taking
# the system with it as it spirals down...
#
MaxClients 150

#
# MaxRequestsPerChild: the number of requests each child process is
# allowed to process before the child dies. The child will exit so
# as to avoid problems after prolonged use when Apache (and maybe the
# libraries it uses) leak memory or other resources. On most systems, this
# isn't really needed, but a few (such as Solaris) do have notable leaks
# in the libraries. For these platforms, set to something like 10000
# or so; a setting of 0 means unlimited.
#
# NOTE: This value does not include keepalive requests after the initial
# request per connection. For example, if a child process handles
# an initial request and 10 subsequent "keptalive" requests, it
# would only count as 1 request towards this limit.
#
MaxRequestsPerChild 500

Include conf/ssl/mod_ssl.conf
Include conf/ssl/ssl.default-vhost.conf
Include conf/mailman.conf
Include conf/addon-modules/php.conf
Include conf/mod_gzip.conf
<Directory "/var/www/eet/">

#
# This may also be "None", "All", or any combination of "Indexes",
# "Includes", "FollowSymLinks", "SymLinksifOwnerMatch", "ExecCGI", or "MultiViews".
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
Options FollowSymLinks Includes IncludesNOEXEC Indexes MultiViews

#
# This controls which options the .htaccess files in directories can
# override. Can also be "All", or any combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"
#
AllowOverride All

#
# Controls who can get stuff from this server.
#
<IfModule mod_access.c>
Order allow,deny
Allow from all
</IfModule>
</Directory>
 
Old 08-01-2003, 09:21 PM   #10
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
change this

<Directory "/var/www/eet/">

to this

<Directory "/var/www/eet">
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting up Apache HTTP server Micro420 Linux - Networking 32 03-26-2005 04:53 AM
Two Apache http server problems... eyebrowsoffire Linux - Networking 2 02-17-2005 10:38 PM
http server - Apache alternative Xa! Linux - Networking 2 02-07-2005 08:18 AM
redhat 9.0 http server swatward Linux - Software 2 01-23-2005 08:00 PM
[apache http server] directory hylke Linux - Software 8 08-02-2004 02:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 09:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration